/// <summary> /// Gets the hash code for a formatted field signature using the C# format. /// </summary> /// <param name="source">The sources <see cref="CsField"/> 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 other then constant are included in the definition. By default this is false.</param> /// <returns>The has code of the formatted field.</returns> /// <exception cref="ArgumentNullException">This is thrown if the model is null.</exception> public static int FormatCSharpComparisonHashCode(this CsField source, bool includeSecurity = false, bool includeAttributes = false, bool includeKeywords = false) { var dotNetField = source as IDotNetField; return(dotNetField.FormatCSharpComparisonHashCode(includeSecurity, includeAttributes, includeKeywords)); }
/// <summary> /// Generates the syntax definition of field in c# syntax. The default definition with all options turned off will return the filed signature and constants if defined and the default values. /// </summary> /// <param name="source">The source <see cref="ICsField"/> model to generate.</param> /// <param name="includeSecurity">Includes the security scope which the field 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 field from the source model.</param> /// <returns>Fully formatted field definition or null if the field data could not be generated.</returns> public static string FormatCSharpDeclarationSyntax(this CsField source, bool includeSecurity = true, bool includeAttributes = true, bool includeKeywords = true) { var dotNetField = source as IDotNetField; return(dotNetField.FormatCSharpDeclarationSyntax(includeSecurity, includeAttributes, includeKeywords)); }