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


C# Type.EdmName方法代码示例

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


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

示例1: EnumTypeConfiguration

        /// <summary>
        /// Initializes a new instance of the <see cref="EnumTypeConfiguration"/> class.
        /// </summary>
        public EnumTypeConfiguration(ODataModelBuilder builder, Type clrType)
        {
            if (builder == null)
            {
                throw Error.ArgumentNull("builder");
            }
            if (clrType == null)
            {
                throw Error.ArgumentNull("clrType");
            }

            if (!clrType.IsEnum)
            {
                throw Error.Argument("clrType", SRResources.TypeCannotBeEnum, clrType.FullName);
            }

            ClrType = clrType;
            IsFlags = clrType.GetCustomAttributes(typeof(FlagsAttribute), false).Any();
            UnderlyingType = Enum.GetUnderlyingType(clrType);
            ModelBuilder = builder;
            _name = clrType.EdmName();
            _namespace = clrType.Namespace ?? DefaultNamespace;
            ExplicitMembers = new Dictionary<Enum, EnumMemberConfiguration>();
            RemovedMembers = new List<Enum>();
        }
开发者ID:ZhaoYngTest01,项目名称:WebApi,代码行数:28,代码来源:EnumTypeConfiguration.cs

示例2: StructuralTypeConfiguration

 protected StructuralTypeConfiguration(ODataModelBuilder modelBuilder, Type clrType)
 {
     ClrType = clrType;
     ModelBuilder = modelBuilder;
     Name = ClrType.EdmName();
     Namespace = ClrType.Namespace;
     ExplicitProperties = new Dictionary<PropertyInfo, PropertyConfiguration>();
     RemovedProperties = new List<PropertyInfo>();
 }
开发者ID:mikevpeters,项目名称:aspnetwebstack,代码行数:9,代码来源:StructuralTypeConfiguration.cs

示例3: StructuralTypeConfiguration

        protected StructuralTypeConfiguration(ODataModelBuilder modelBuilder, Type clrType)
            : this()
        {
            if (modelBuilder == null)
            {
                throw Error.ArgumentNull("modelBuilder");
            }

            if (clrType == null)
            {
                throw Error.ArgumentNull("clrType");
            }

            ClrType = clrType;
            ModelBuilder = modelBuilder;
            _name = clrType.EdmName();
            _namespace = clrType.Namespace ?? DefaultNamespace;
        }
开发者ID:tlycken,项目名称:aspnetwebstack,代码行数:18,代码来源:StructuralTypeConfiguration.cs

示例4: StructuralTypeConfiguration

        protected StructuralTypeConfiguration(ODataModelBuilder modelBuilder, Type clrType)
        {
            if (modelBuilder == null)
            {
                throw Error.ArgumentNull("modelBuilder");
            }

            if (clrType == null)
            {
                throw Error.ArgumentNull("clrType");
            }

            ClrType = clrType;
            ModelBuilder = modelBuilder;
            Name = ClrType.EdmName();
            Namespace = ClrType.Namespace ?? DefaultNamespace;
            ExplicitProperties = new Dictionary<PropertyInfo, PropertyConfiguration>();
            RemovedProperties = new List<PropertyInfo>();
        }
开发者ID:naulizzang,项目名称:aspnetwebstack,代码行数:19,代码来源:StructuralTypeConfiguration.cs

示例5: StructuralTypeConfiguration

        protected StructuralTypeConfiguration(ODataModelBuilder modelBuilder, Type clrType)
            : this()
        {
            if (modelBuilder == null)
            {
                throw Error.ArgumentNull("modelBuilder");
            }

            if (clrType == null)
            {
                throw Error.ArgumentNull("clrType");
            }

            if (clrType == typeof(DateTime) || clrType == typeof(DateTime?))
            {
                throw Error.Argument("clrType", SRResources.DateTimeTypeNotSupported, clrType.FullName);
            }

            ClrType = clrType;
            ModelBuilder = modelBuilder;
            _name = clrType.EdmName();
            _namespace = clrType.Namespace ?? DefaultNamespace;
        }
开发者ID:ahmetgoktas,项目名称:aspnetwebstack,代码行数:23,代码来源:StructuralTypeConfiguration.cs

示例6: EdmFullName

 public void EdmFullName(Type clrType, string expectedName)
 {
     Assert.Equal(expectedName, clrType.EdmName());
 }
开发者ID:mikevpeters,项目名称:aspnetwebstack,代码行数:4,代码来源:EdmLibHelpersTests.cs


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