本文整理汇总了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>();
}
示例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>();
}
示例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;
}
示例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>();
}
示例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;
}
示例6: EdmFullName
public void EdmFullName(Type clrType, string expectedName)
{
Assert.Equal(expectedName, clrType.EdmName());
}