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


C# System.TypeExtension类代码示例

本文整理汇总了C#中System.TypeExtension的典型用法代码示例。如果您正苦于以下问题:C# TypeExtension类的具体用法?C# TypeExtension怎么用?C# TypeExtension使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TypeExtension类属于System命名空间,在下文中一共展示了TypeExtension类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetValue

		private static object GetValue(TypeExtension typeExtension, MemberAccessor member, string elemName, out bool isSet)
		{
			var value = typeExtension[member.Name][elemName].Value;

			isSet = value != null;

			return value;
		}
开发者ID:Gremlin2,项目名称:bltoolkit,代码行数:8,代码来源:ExtensionMetadataProvider.cs

示例2: GetMapIgnore

		public virtual bool GetMapIgnore(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			isSet = false;

			return
				TypeHelper.IsScalar(member.Type) == false;// ||
				//(member.MemberInfo is FieldInfo && ((FieldInfo)member.MemberInfo).IsLiteral);
		}
开发者ID:sscctech,项目名称:bltoolkit,代码行数:8,代码来源:MetadataProviderBase.cs

示例3: GetInheritanceDiscriminator

		public override bool GetInheritanceDiscriminator(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			var value = GetValue(typeExtension, member, "IsInheritanceDiscriminator", out isSet);

			if (value != null)
				return TypeExtension.ToBoolean(value);

			return base.GetInheritanceDiscriminator(typeExtension, member, out isSet);
		}
开发者ID:Gremlin2,项目名称:bltoolkit,代码行数:9,代码来源:ExtensionMetadataProvider.cs

示例4: GetFieldStorage

		public override string GetFieldStorage(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			var value = GetValue(typeExtension, member, "FieldStorage", out isSet);

			if (value != null)
				return value.ToString();

			return base.GetFieldStorage(typeExtension, member, out isSet);
		}
开发者ID:Gremlin2,项目名称:bltoolkit,代码行数:9,代码来源:ExtensionMetadataProvider.cs

示例5: GetMapIgnore

		public override bool GetMapIgnore(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			var value = GetValue(typeExtension, member, "MapIgnore", out isSet);

			if (value != null)
				return TypeExtension.ToBoolean(value);

			return base.GetMapIgnore(typeExtension, member, out isSet) || GetAssociation(typeExtension, member) != null;
		}
开发者ID:Gremlin2,项目名称:bltoolkit,代码行数:9,代码来源:ExtensionMetadataProvider.cs

示例6: GetFieldStorage

		public override string GetFieldStorage(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			foreach (var p in _list)
			{
				var name = p.GetFieldStorage(typeExtension, member, out isSet);

				if (isSet)
					return name;
			}

			return base.GetFieldStorage(typeExtension, member, out isSet);
		}
开发者ID:starteleport,项目名称:bltoolkit,代码行数:12,代码来源:MetadataProviderList.cs

示例7: GetInheritanceDiscriminator

		public override bool GetInheritanceDiscriminator(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			foreach (var p in _list)
			{
				var value = p.GetInheritanceDiscriminator(typeExtension, member, out isSet);

				if (isSet)
					return value;
			}

			return base.GetInheritanceDiscriminator(typeExtension, member, out isSet);
		}
开发者ID:starteleport,项目名称:bltoolkit,代码行数:12,代码来源:MetadataProviderList.cs

示例8: GetFieldStorage

		public override string GetFieldStorage(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			if (IsLinqObject(member.TypeAccessor.Type))
			{
				var a = member.GetAttribute<ColumnAttribute>();

				if (a != null && !string.IsNullOrEmpty(a.Name))
				{
					isSet = true;
					return a.Storage;
				}
			}

			return base.GetFieldStorage(typeExtension, member, out isSet);
		}
开发者ID:MajidSafari,项目名称:bltoolkit,代码行数:15,代码来源:LinqMetadataProvider.cs

示例9: GetFieldStorage

		public override string GetFieldStorage(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			var a = member.GetAttribute<MapFieldAttribute>();

			if (a != null)
			{
				isSet = true;
				return a.Storage;
			}

			foreach (MapFieldAttribute attr in GetMapFieldAttributes(member.TypeAccessor))
			{
				if (string.Equals(attr.OrigName, member.Name, StringComparison.InvariantCultureIgnoreCase))
				{
					isSet = true;
					return attr.Storage;
				}
			}

			return base.GetFieldStorage(typeExtension, member, out isSet);
		}
开发者ID:ivanoffalex,项目名称:bltoolkit,代码行数:21,代码来源:AttributeMetadataProvider.cs

示例10: GetFieldStorage

		public virtual string GetFieldStorage(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			isSet = false;
			return null;
		}
开发者ID:sscctech,项目名称:bltoolkit,代码行数:5,代码来源:MetadataProviderBase.cs

示例11: GetFieldName

		public virtual string GetFieldName(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			isSet = false;
			return member.Name;
		}
开发者ID:sscctech,项目名称:bltoolkit,代码行数:5,代码来源:MetadataProviderBase.cs

示例12: GetInheritanceMapping

		public virtual InheritanceMappingAttribute[] GetInheritanceMapping(Type type, TypeExtension typeExtension)
		{
			return Array<InheritanceMappingAttribute>.Empty;
		}
开发者ID:sscctech,项目名称:bltoolkit,代码行数:4,代码来源:MetadataProviderBase.cs

示例13: GetAssociation

		public virtual Association GetAssociation(TypeExtension typeExtension, MemberAccessor member)
		{
			return null;
		}
开发者ID:sscctech,项目名称:bltoolkit,代码行数:4,代码来源:MetadataProviderBase.cs

示例14: GetPrimaryKeyFields

		protected static List<string> GetPrimaryKeyFields(MappingSchema schema, TypeAccessor ta, TypeExtension tex)
		{
			var mdp  = schema.MetadataProvider;
			var keys = new List<string>();

			foreach (MemberAccessor sma in ta)
			{
				bool isSetFlag;

				mdp.GetPrimaryKeyOrder(ta.Type, tex, sma, out isSetFlag);

				if (isSetFlag)
				{
					var name = mdp.GetFieldName(tex, sma, out isSetFlag);
					keys.Add(name);
				}
			}

			return keys;
		}
开发者ID:sscctech,项目名称:bltoolkit,代码行数:20,代码来源:MetadataProviderBase.cs

示例15: GetSqlIgnore

		public virtual bool GetSqlIgnore(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			isSet = false;
			return false;
		}
开发者ID:sscctech,项目名称:bltoolkit,代码行数:5,代码来源:MetadataProviderBase.cs


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