Example #1
0
        CustomAttribute GenerateEditorBrowsable(EditorBrowsableState state)
        {
            CustomAttribute attrib = new CustomAttribute(m_EditorBrowsableAttribute_ctor);

            attrib.ConstructorArguments.Add(new CustomAttributeArgument(t_EditorBrowsableState, state));
            return(attrib);
        }
Example #2
0
 public MethodNameInfo(string name, bool isConstructor, bool isDeconstructor, EditorBrowsableState editorBrowsableState)
 {
     this.name = name;
     this.isConstructor = isConstructor;
     this.isDeconstructor = isDeconstructor;
     this.editorBrowsableState = editorBrowsableState;
 }
Example #3
0
 public MethodNameInfo(string name, bool isConstructor, bool isDeconstructor, EditorBrowsableState editorBrowsableState)
 {
     this.name                 = name;
     this.isConstructor        = isConstructor;
     this.isDeconstructor      = isDeconstructor;
     this.editorBrowsableState = editorBrowsableState;
 }
        internal static CodeAttributeDeclaration CreateEditorBrowsableAttribute(EditorBrowsableState editorBrowsableState)
        {
            CodeAttributeDeclaration    declaration  = new CodeAttributeDeclaration(new CodeTypeReference(typeof(EditorBrowsableAttribute)));
            CodeTypeReferenceExpression targetObject = new CodeTypeReferenceExpression(typeof(EditorBrowsableState));
            CodeAttributeArgument       argument     = new CodeAttributeArgument(new CodeFieldReferenceExpression(targetObject, editorBrowsableState.ToString()));

            declaration.Arguments.Add(argument);
            return(declaration);
        }
        public static void Equals(EditorBrowsableState state1, EditorBrowsableState state2, bool equal)
        {
            var attr1 = new EditorBrowsableAttribute(state1);
            var attr2 = new EditorBrowsableAttribute(state2);

            Assert.True(attr1.Equals(attr1));
            Assert.Equal(equal, attr1.Equals(attr2));
            Assert.Equal(equal, attr2.Equals(attr1));
            Assert.Equal(equal, attr1.GetHashCode().Equals(attr2.GetHashCode()));
        }
Example #6
0
        public static void EqualsTest(EditorBrowsableState state1, EditorBrowsableState state2, bool equal)
        {
            var attr1 = new EditorBrowsableAttribute(state1);
            var attr2 = new EditorBrowsableAttribute(state2);

            Assert.True(attr1.Equals(attr1));
            Assert.Equal(equal, attr1.Equals(attr2));
            Assert.Equal(equal, attr2.Equals(attr1));
            Assert.Equal(equal, attr1.GetHashCode().Equals(attr2.GetHashCode()));
        }
		public EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState state)
		{
			this.state = state;
		}
		public EditorBrowsableAttribute ()
		{
			this.state = EditorBrowsableState.Always;
		}
Example #9
0
 public void AddEditorBrowsableAttribute(EditorBrowsableState state) => this.Add(typeof(EditorBrowsableAttribute), state);
Example #10
0
 public EditorBrowsableAttribute(EditorBrowsableState state)
 {
     State = state;
 }
Example #11
0
 public EditorBrowsableAttribute()
 {
     this.state = EditorBrowsableState.Always;
 }
 public EditorBrowsableAttribute(EditorBrowsableState state) => this.browsableState = state;
Example #13
0
 public MethodNameInfo(string name, EditorBrowsableState editorBrowsableState)
     : this(name, false, false, editorBrowsableState)
 {
 }
Example #14
0
 public EditorBrowsableAttribute(EditorBrowsableState state)
 {
     throw new NotImplementedException();
 }
 public static void Ctor_EditableBrowserState(EditorBrowsableState state)
 {
     Assert.Equal(state, new EditorBrowsableAttribute(state).State);
 }
Example #16
0
 public extern EditorBrowsableAttribute(EditorBrowsableState state);
Example #17
0
 public MethodNameInfo(string name, EditorBrowsableState editorBrowsableState)
     : this(name, false, false, editorBrowsableState)
 {
 }
 private static CodeAttributeDeclaration CreateEditorBrowsableAttribute(EditorBrowsableState editorBrowsableState)
 {
     CodeAttributeDeclaration declaration = new CodeAttributeDeclaration(new CodeTypeReference(typeof(EditorBrowsableAttribute)));
     CodeTypeReferenceExpression targetObject = new CodeTypeReferenceExpression(typeof(EditorBrowsableState));
     CodeAttributeArgument argument = new CodeAttributeArgument(new CodeFieldReferenceExpression(targetObject, editorBrowsableState.ToString()));
     declaration.Arguments.Add(argument);
     return declaration;
 }
 public EditorBrowsableAttribute(EditorBrowsableState state)
 {
 }
Example #20
0
 public static void Ctor_EditableBrowserState(EditorBrowsableState state)
 {
     Assert.Equal(state, new EditorBrowsableAttribute(state).State);
 }
Example #21
0
 public EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState state)
 {
     this.state = state;
 }
 public void AddEditorBrowsableAttribute(EditorBrowsableState state) => this.Add(this.builder.GetType("System.ComponentModel.EditorBrowsableAttribute"), state);
 public EditorBrowsableAttribute(EditorBrowsableState state)
 {
     this.browsableState = state;
 }
Example #24
0
 internal EditorBrowsableAttribute(EditorBrowsableState state) : base()
 {
 }