Apistry.Samples.Service.Api.Documentation.Conventions.EntityIdConvention.IncludeProperty C# (CSharp) Method

IncludeProperty() public method

public IncludeProperty ( IEnumerable httpMethods, PropertyInfo propertyInfo, Type parentObjectType ) : System.Boolean
httpMethods IEnumerable
propertyInfo System.Reflection.PropertyInfo
parentObjectType System.Type
return System.Boolean
        public Boolean IncludeProperty(IEnumerable<HttpMethod> httpMethods, PropertyInfo propertyInfo, Type parentObjectType)
        {
            return httpMethods.All(m => !m.Equals(HttpMethod.Post)) || !propertyInfo.Name.Equals("Id", StringComparison.OrdinalIgnoreCase);
        }
EntityIdConvention