Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manoj-choudhari-git/a04a293f9bba44f24dc46486cdb41459 to your computer and use it in GitHub Desktop.
Save manoj-choudhari-git/a04a293f9bba44f24dc46486cdb41459 to your computer and use it in GitHub Desktop.
GetCreatedTimeImplementation to get the time of object creation
public class GetCreatedTimeImplementation : ITransientGetCreatedTime,
IScopedGetCreatedTime,
ISingletonGetCreatedTime
{
private readonly DateTime createdOn;
public GetCreatedTimeImplementation()
{
this.createdOn = DateTime.Now;
}
public DateTime GetCreatedTime()
{
return this.createdOn;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment