当前位置: 首页>>代码示例>>C#>>正文


C# AttributeTableBuilder.AddTable方法代码示例

本文整理汇总了C#中AttributeTableBuilder.AddTable方法的典型用法代码示例。如果您正苦于以下问题:C# AttributeTableBuilder.AddTable方法的具体用法?C# AttributeTableBuilder.AddTable怎么用?C# AttributeTableBuilder.AddTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AttributeTableBuilder的用法示例。


在下文中一共展示了AttributeTableBuilder.AddTable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddTables

        private static void AddTables(AttributeTableBuilder builder)
        {
            Debug.Assert(builder != null, "AddTables is called with null parameter!");

            Assembly asm = Assembly.GetExecutingAssembly();
            foreach (Type t in asm.GetTypes())
            {
                if (t.IsSubclassOf(typeof(AttributeTableBuilder)))
                {
                    try
                    {
                        AttributeTableBuilder atb = (AttributeTableBuilder)Activator.CreateInstance(t);
                        builder.AddTable(atb.CreateTable());
                    }
                    catch (Exception e)
                    {
                        if (e.IsFatal())
                        {
                            throw;
                        }
                        Debug.Assert(false, string.Format(CultureInfo.InvariantCulture, "Exception in AddTables method: {0}", e));
                    }
                }
            }
        }
开发者ID:OpenRIAServices,项目名称:OpenRiaServices,代码行数:25,代码来源:MetadataBase.cs

示例2: AddAttributes

        protected override void AddAttributes(AttributeTableBuilder builder)
        {
            // duplicated from .Design
            //MessageBox.Show("MetadataRegistration AddAttributes");

            /*builder.AddCallback(
                typeof(SSWCD.Interpolator),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWCDC.AxisLabel),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWCDC.DateTimeAxisLabel),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWCDCP.EdgePanel),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));*/

            //builder.AddCallback(
            //    typeof(CustomControl1),
            //    b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));

            //builder.AddCustomAttributes(typeof(CustomControl1), new FeatureAttribute(typeof(OpacitySliderAdornerProvider)));

            builder.AddTable(new CustomControl1Metadata().CreateTable());
            /*builder.AddCallback(
                typeof(SSWCDC.NumericAxisLabel),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWCD.Title),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));

            // VisualStudio.Design's own stuff

            builder.AddCallback(
                typeof(SSWCDC.AreaDataPoint),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWCDC.BarDataPoint),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWCDC.BubbleDataPoint),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWCDC.ColumnDataPoint),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWCDC.LineDataPoint),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWCDC.PieDataPoint),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
            builder.AddCallback(
                typeof(SSWCDC.ScatterDataPoint),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));

            builder.AddCallback(
                typeof(SSWCDC.LegendItem),
                b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));*/
        }
开发者ID:Jedzia,项目名称:BackBock,代码行数:60,代码来源:MetadataRegistration.cs

示例3: AddTables

		private void AddTables(AttributeTableBuilder builder, object parent)
		{
			Debug.Assert(builder != null, "AddTables is called with null parameter!");

			Assembly asm = parent.GetType().Assembly;
			foreach (Type t in asm.GetTypes())
			{
				if (t.IsSubclassOf(typeof(AttributeTableBuilder)))
				{
					try
					{
						AttributeTableBuilder atb = (AttributeTableBuilder)Activator.CreateInstance(t);
						builder.AddTable(atb.CreateTable());
					}
					catch (Exception ex)
					{
					}
				}
			}
		}
开发者ID:modulexcite,项目名称:ExtensionSDKSample,代码行数:20,代码来源:MetadataRegistrationBase.cs


注:本文中的AttributeTableBuilder.AddTable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。