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);
 }
Example #2
0
 private void SetFlag(ConnectorAttributeInfo.Flags flag, bool value)
 {
     if (value)
     {
         _flags = _flags | flag;
     }
     else
     {
         _flags = _flags & ~flag;
     }
 }
Example #3
0
 /// <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: &lt;not set&gt;
 /// 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;
 }
Example #4
0
 /// <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: &lt;not set&gt;
 /// Readable: true
 /// Writeable: true
 /// Required: false
 /// Type: string
 /// MultiValue: false
 /// </pre>
 /// </remarks>
 public ConnectorAttributeInfoBuilder()
 {
     ValueType = (typeof(String));
     _flags = ConnectorAttributeInfo.Flags.NONE;
 }