/// <summary> /// Gets the hash code for a formatted property signature using the C# format. /// </summary> /// <param name="source">The sources <see cref="CsProperty"/> model.</param> /// <param name="includeSecurity">Optional parameter that determines to generate security in the definition. By default this is false.</param> /// <param name="includeAttributes">Optional parameter that determines if the attributes should be included in the definition. By default this is false.</param> /// <param name="includeKeywords">Optional parameter that determines if all keywords are included in the definition. By default this is false.</param> /// <returns>The hash code of the formatted model.</returns> /// <exception cref="ArgumentNullException">This is thrown if the model is null.</exception> public static int FormatCSharpComparisonHashCode(this CsProperty source, bool includeSecurity = false, bool includeAttributes = false, bool includeKeywords = false) { var dotNetProperty = source as IDotNetProperty; return(dotNetProperty.FormatCSharpComparisonHashCode(includeSecurity, includeAttributes, includeKeywords)); }
/// <summary> /// Generates the syntax definition of a default no backing fields property definition in c# syntax. /// </summary> /// <param name="source">The source <see cref="CsProperty"/> model to generate.</param> /// <param name="includeSecurity">Includes the security scope which the property was defined in the model.</param> /// <param name="includeAttributes">Includes definition of the attributes assigned to the model.</param> /// <param name="includeKeywords">Includes all keywords assigned to the property from the source model.</param> /// <returns>Fully formatted property definition or null if the property data could not be generated.</returns> public static string FormatCSharpDeclarationSyntax(this CsProperty source, bool includeSecurity = true, bool includeAttributes = true, bool includeKeywords = true) { var dotNetProperty = source as IDotNetProperty; return(dotNetProperty.FormatCSharpDeclarationSyntax(includeSecurity, includeAttributes, includeKeywords)); }