private ConnectorAttributeInfo.Flags AllFlags() { ConnectorAttributeInfo.Flags flags = ConnectorAttributeInfo.Flags.NONE; foreach (Enum e in Enum.GetValues(typeof(ConnectorAttributeInfo.Flags))) { ConnectorAttributeInfo.Flags f = (ConnectorAttributeInfo.Flags)e; flags |= f; } return(flags); }
private void SetFlag(ConnectorAttributeInfo.Flags flag, bool value) { if (value) { _flags = _flags | flag; } else { _flags = _flags & ~flag; } }
/// <summary> /// Creates an builder with all the defaults set. /// </summary> /// <remarks> /// The name must be set before /// the 'build' method is called otherwise an <see cref="IllegalStateException" /> /// is thrown. /// <pre> /// Name: <not set> /// Readable: true /// Writeable: true /// Required: false /// Type: string /// MultiValue: false /// </pre> /// </remarks> public ConnectorAttributeInfoBuilder(String name, Type type) { Name = (name); ValueType = (type); //noneOf means the defaults _flags = ConnectorAttributeInfo.Flags.NONE; }
/// <summary> /// Creates an builder with all the defaults set. /// </summary> /// <remarks> /// The name must be set before /// the 'build' method is called otherwise an <see cref="IllegalStateException" /> /// is thrown. /// <pre> /// Name: <not set> /// Readable: true /// Writeable: true /// Required: false /// Type: string /// MultiValue: false /// </pre> /// </remarks> public ConnectorAttributeInfoBuilder() { ValueType = (typeof(String)); _flags = ConnectorAttributeInfo.Flags.NONE; }