System.Type.GetTypeProperty()

Here are the examples of the csharp api System.Type.GetTypeProperty() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

19 Source : SanityDocumentExtensions.cs
with MIT License
from oslofjord

public static string SanityType(this object doreplacedent)
        {
            if (doreplacedent == null) return null;

            // Return type using reflection (based on conventions)
            var docTypeProperty = doreplacedent.GetType().GetTypeProperty();
            if (docTypeProperty != null)
            {
                return docTypeProperty.GetValue(doreplacedent)?.ToString();
            }
            return null;
        }

19 Source : SanityDocumentExtensions.cs
with MIT License
from oslofjord

internal static bool HasDoreplacedentTypeProperty(this object doreplacedent)
        {
            return doreplacedent?.GetType()?.GetTypeProperty() != null;
        }