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


C# SimpleValue.AddFormula方法代码示例

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


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

示例1: BindSimpleValue

		private void BindSimpleValue(HbmDiscriminator discriminatorSchema, SimpleValue discriminator)
		{
			if (discriminatorSchema.type != null)
				discriminator.TypeName = discriminatorSchema.type;

			if (discriminatorSchema.formula != null)
			{
				var f = new Formula {FormulaString = discriminatorSchema.formula};
				discriminator.AddFormula(f);
			}
			else
			{
				new ColumnsBinder(discriminator, Mappings).Bind(discriminatorSchema.Columns, false,
				                                                () =>
				                                                new HbmColumn
				                                                	{
				                                                		name =
				                                                			mappings.NamingStrategy.PropertyToColumnName(
				                                                			RootClass.DefaultDiscriminatorColumnName),
				                                                		length = discriminatorSchema.length,
																														notnull = discriminatorSchema.notnull,
																														notnullSpecified = true
				                                                	});
			}
		}
开发者ID:jlevitt,项目名称:nhibernate-core,代码行数:25,代码来源:ClassDiscriminatorBinder.cs

示例2: BindSimpleValue

		private void BindSimpleValue(HbmDiscriminator discriminatorSchema, SimpleValue discriminator)
		{
			if (discriminatorSchema.type != null)
				discriminator.TypeName = discriminatorSchema.type;

			if (discriminatorSchema.formula != null)
			{
				Formula f = new Formula();
				f.FormulaString = discriminatorSchema.formula;
				discriminator.AddFormula(f);
			}
			else
				BindColumns(discriminatorSchema, discriminator);
		}
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:14,代码来源:ClassDiscriminatorBinder.cs

示例3: BindColumnsOrFormula

 private void BindColumnsOrFormula(XmlNode node, SimpleValue simpleValue, string path, bool isNullable)
 {
     XmlAttribute formulaNode = node.Attributes["formula"];
     if (formulaNode != null)
     {
         Formula f = new Formula();
         f.FormulaString = formulaNode.InnerText;
         simpleValue.AddFormula(f);
     }
     else
         BindColumns(node, simpleValue, isNullable, true, path);
 }
开发者ID:aistrate,项目名称:TypingPracticeTexts,代码行数:12,代码来源:ClassBinder.cs

示例4: linkWithValue

 public void linkWithValue(SimpleValue value)
 {
     if (formula != null)
     {
         value.AddFormula(formula);
     }
     else
     {
         MappingColumn.Value = value;
         value.AddColumn(MappingColumn);
         value.Table.AddColumn(MappingColumn);
         AddColumnBinding(value);
         table = value.Table;
     }
 }
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:15,代码来源:Ejb3Column.cs

示例5: BindColumnsOrFormula

		private void BindColumnsOrFormula(XmlNode node, SimpleValue simpleValue, string path, bool isNullable)
		{
			var formula = GetFormula(node);
			if (formula != null)
			{
				var f = new Formula { FormulaString = formula };
				simpleValue.AddFormula(f);
			}
			else
				BindColumns(node, simpleValue, isNullable, true, path);
		}
开发者ID:nkmajeti,项目名称:nhibernate,代码行数:11,代码来源:ClassBinder.cs

示例6: BindSimpleValue

		//automatically makes a column with the default name if none is specifed by XML
		public static void BindSimpleValue(XmlNode node, SimpleValue model, bool isNullable, string path, Mappings mappings)
		{
			model.Type = GetTypeFromXML(node);

			XmlAttribute formulaNode = node.Attributes["formula"];
			if (formulaNode != null)
			{
				Formula f = new Formula();
				f.FormulaString = formulaNode.InnerText;
				model.AddFormula(f);
			}
			else
			{
				BindColumns(node, model, isNullable, true, path, mappings);
			}

			XmlAttribute fkNode = node.Attributes["foreign-key"];
			if (fkNode != null)
			{
				model.ForeignKeyName = fkNode.Value;
			}
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:23,代码来源:HbmBinder.cs


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