Thanks for suggestion. However, it is not possible to implement it exactly as you proposed - static member will be defined in a base class so it would be shared between all instances for different document types. It is also not possible to use reflection in base class static member to get these details.
Feature Suggestion make DocumentTypeBase.NodeTypeAlias property static
Then I could have:
DocumentType.GetByAlias(DocTypes.LinkToOrigin.NodeTypeAlias)
Rather than:
DocumentType.GetByAlias((new DocTypes.LinkToOrigin()).NodeTypeAlias)
There could be other static methods to make document creation easier.
Hi Murray,
Thanks for suggestion. However, it is not possible to implement it exactly as you proposed - static member will be defined in a base class so it would be shared between all instances for different document types. It is also not possible to use reflection in base class static member to get these details.
So instead we'll make a method like this:
static string GetDocumentTypeAlias(Type documentType)
so you'll be able to use it as following:
GetDocumentTypeAlias(typeof(MyDocumentType));
(I'm not sure yet where exactly we'll put that method)
Sounds good, but if it doesn't fit in somewhere neatly, don't force it, just leave it out :-)
is working on a reply...