![]() |
VOOZH | about |
dotnet add package CodeHelper.Core.PlaceHolder --version 6.3.3
NuGet\Install-Package CodeHelper.Core.PlaceHolder -Version 6.3.3
<PackageReference Include="CodeHelper.Core.PlaceHolder" Version="6.3.3" />
<PackageVersion Include="CodeHelper.Core.PlaceHolder" Version="6.3.3" />Directory.Packages.props
<PackageReference Include="CodeHelper.Core.PlaceHolder" />Project file
paket add CodeHelper.Core.PlaceHolder --version 6.3.3
#r "nuget: CodeHelper.Core.PlaceHolder, 6.3.3"
#:package CodeHelper.Core.PlaceHolder@6.3.3
#addin nuget:?package=CodeHelper.Core.PlaceHolder&version=6.3.3Install as a Cake Addin
#tool nuget:?package=CodeHelper.Core.PlaceHolder&version=6.3.3Install as a Cake Tool
Replace the placeholders in a text with the values of the object
If you use this package in a commercial way, please think of supporting the developer:
using CodeHelper.Core.PlaceHolder;
public class Location
{
#region Properties
[Placeholder("{CONTACTNAME}")]
public string ContactName { get; set; }
[Placeholder("{USERNAME}")]
public string UserName { get; set; }
[Placeholder("{DATECREATED}","MMM dd, yyyy")]
public string CreationDate { get; set; }
[Placeholder("{DATES}", "MMM dd, yyyy")]
public List<DateTime> SpecialDates { get; set; } = new();
#endregion
}
The value {CONTACTNAME} can be anything. This value will be used in your text
using CodeHelper.Core.PlaceHolder;
var _generalText = "{CONTACTNAME}, your account has been created on {DATECREATED} with username {USERNAME}\n\nDon't forget the following important dates:\n{DATES}'";
var _location = new Location() {ContactName = "Frederik", UserName= "FrederikvanLierde", CreationDate = "2022-04-01" };
country.SpecialDates.Add(new DateTime(2022, 8, 1));
country.SpecialDates.Add(new DateTime(2022, 4, 1));
_generalText = _text.Replace(_location,false,FormatTypes.MARKDOWN));
Frederik, your account has been created on April 1, 2022 with username FrederikvanLierde
Don't forget the following important dates:
using CodeHelper.Core.PlaceHolder;
var _generalText = "{CONTACTNAME}, your account has been created on {DATECREATED} with username {USERNAME}";
var _location = new Location() {ContactName = "Frederik", UserName= "FrederikvanLierde", CreationDate = "2022-04-01" };
_generalText.Replace(_location,FormatTypes.MARKDOWN);
using CodeHelper.Core.PlaceHolder;
var _generalText = "{CONTACTNAME}, your account has been created on {DATECREATED} with username {USERNAME}";
var _location = new Location() {ContactName = "Frederik", UserName= "FrederikvanLierde", CreationDate = "2022-04-01" };
var updatedString = PlaceHolderHelper.Replace(_generalText, _location,FormatTypes.HTML);
Frederik, your account has been created on April 1, 2022 with username FrederikvanLierde
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 5 NuGet packages that depend on CodeHelper.Core.PlaceHolder:
| Package | Downloads |
|---|---|
|
CodeHelper.Core.OAuth2
CodeHelper.Core.OAuth2 is a lightweight and easy to use .NET OAuth Wrapper (Mostly used by the CodeHelper.API packages |
|
|
CodeHelper.API.Pinterest
CodeHelper.API.Pinterest is a lightweight and easy to use .NET Pinterest Wrapper letting you to manage your baords and pins (including create, update and delete For more information and a list of endpoints available, please see the detailed documentation pages below. |
|
|
CodeHelper.API.LinkedIn
CodeHelper.API.LinkedIn is a lightweight and simple .NET Wrapper to let you share posts, url and articles on LinkedIn Including getAuthorID, ShareTextMessage, ShareUrl and ShareImage For more information and a list of endpoints available, please see the detailed documentation pages below. |
|
|
CodeHelper.API.NYTimes
CodeHelper.API.NYTimes is a lightweight and simple .NET Wrapper to get links and metadata for Times' articles as soon as they are published on NYTimes.com. The Times Newswire API provides an up-to-the-minute stream of published articles. You can filter results by source (all, nyt, inyt) and section (arts, business, ...). The latest version also included Best Seller List, Get Books on a Best Seller List, Get NYT Reviews by author¦isbn¦title, Movies Critics, Movie Critic icks and Search Movie Reviews For more information and a list of endpoints available, please see the detailed documentation pages below. |
|
|
CodeHelper.API.YouTube
CodeHelper.API.YouTube is a lightweight and simple .NET Wrapper to let you access the YouTube Search API Search for Videos, Channels, playlists, Movies, 3D Videos, ... For more information and a list of endpoints available, please see the detailed documentation pages below. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 6.3.3 | 2,207 | 9/24/2022 | |
| 6.3.2 | 1,110 | 9/24/2022 | |
| 6.3.1 | 1,541 | 9/16/2022 | |
| 6.3.0 | 583 | 9/13/2022 | |
| 6.2.0 | 749 | 9/8/2022 | 6.2.0 is deprecated because it is no longer maintained. |
| 6.1.0 | 569 | 9/7/2022 | |
| 6.0.1 | 1,068 | 9/1/2022 | |
| 6.0.0 | 1,376 | 8/7/2022 | |
| 5.0.0 | 585 | 8/7/2022 | |
| 1.1.1 | 562 | 8/5/2022 | |
| 1.1.0 | 552 | 8/5/2022 | |
| 1.0.0 | 558 | 8/4/2022 |