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


C# IPropertyDefinition类代码示例

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


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

示例1: QueryPlanProperty

 /// <summary>
 /// Create a new query plan property
 /// </summary>
 /// <param name="myVertexType">The interesting vertex type</param>
 /// <param name="myProperty">The interesting property</param>
 public QueryPlanProperty(IVertexType myVertexType, IPropertyDefinition myProperty, String myInterestingEdition, TimeSpanDefinition myInterestingTimeSpan)
 {
     VertexType = myVertexType;
     Property = myProperty;
     Edition = myInterestingEdition;
     Timespan = myInterestingTimeSpan;
 }
开发者ID:anukat2015,项目名称:sones,代码行数:12,代码来源:QueryPlanProperty.cs

示例2: Aggregate

        /// <summary>
        /// Calculates the sum
        /// </summary>
        public FuncParameter Aggregate(IEnumerable<IComparable> myValues, IPropertyDefinition myPropertyDefinition)
        {
            var sumType = myPropertyDefinition.BaseType;
            IComparable sum = null;

            try
            {
                foreach (var value in myValues)
                {
                    if (sum == null)
                    {
                        sum = ArithmeticOperations.Add(sumType, 0, value);
                    }
                    else
                    {
                        sum = ArithmeticOperations.Add(sumType, sum, value);
                    }
                }
            }
            catch (ArithmeticException)
            {
                throw new InvalidArithmeticAggregationException(sumType, this.AggregateName);
            }

            return new FuncParameter(sum, myPropertyDefinition);
        }
开发者ID:loubo,项目名称:sones,代码行数:29,代码来源:SumAggregate.cs

示例3: DoCreate

		/// <summary>
		/// Creates the a <see cref="Column"/>.
		/// </summary>
		/// <param name="context">The <see cref="IMansionContext"/>.</param>
		/// <param name="table">The <see cref="Table"/> to which the column will be added.</param>
		/// <param name="property">The <see cref="IPropertyDefinition"/>.</param>
		/// <returns>Returns the created <see cref="Column"/>.</returns>
		protected virtual Column DoCreate(IMansionContext context, Table table, IPropertyDefinition property)
		{
			// get the column name
			var columnName = Properties.Get<string>(context, "columnName", null) ?? property.Name;

			// create the column
			return PropertyColumn.CreatePropertyColumn(context, property.Name, columnName, Properties);
		}
开发者ID:Erikvl87,项目名称:Premotion-Mansion,代码行数:15,代码来源:ColumnDescriptor.cs

示例4: DoCreateSingleMapping

			/// <summary>
			/// Creates a <see cref="PropertyMapping"/> from this descriptor.
			/// </summary>
			/// <param name="context">The <see cref="IMansionContext"/>.</param>
			/// <param name="property">The <see cref="IPropertyDefinition"/>.</param>
			/// <returns>The created <see cref="PropertyMapping"/>.</returns>
			protected override SinglePropertyMapping DoCreateSingleMapping(IMansionContext context, IPropertyDefinition property)
			{
				// create the mapping
				return new SingleValuedPropertyMapping(property.Name) {
					// map the type
					Type = Properties.Get<string>(context, "type")
				};
			}
开发者ID:Erikvl87,项目名称:Premotion-Mansion,代码行数:14,代码来源:SingleValuedPropertyMapping.cs

示例5: ServicePropertyDefinition

 public ServicePropertyDefinition(IPropertyDefinition myPropertyDefinition)
     : base(myPropertyDefinition)
 {
     this.IsMandatory = myPropertyDefinition.IsMandatory;
     this.InIndices = myPropertyDefinition.InIndices.Select(x => x.Name).ToList();
     this.Multiplicity = ConvertHelper.ToServicePropertyMultiplicity(myPropertyDefinition.Multiplicity);
     this.IsUserDefinedType = myPropertyDefinition.IsUserDefinedType;
     this.BaseType = myPropertyDefinition.BaseType.AssemblyQualifiedName;
     this.DefaultValue = myPropertyDefinition.DefaultValue;
 }
开发者ID:anukat2015,项目名称:sones,代码行数:10,代码来源:ServicePropertyDefinition.cs

示例6: CciPropertyDetails

        public CciPropertyDetails(IPropertyDefinition property)
            : base(property)
        {
            if (property == null)
            {
                throw new ArgumentNullException("property");
            }

            _property = property;
        }
开发者ID:Pablissimo,项目名称:nrconfig,代码行数:10,代码来源:CciPropertyDetails.cs

示例7: Visit

        public override void Visit(IPropertyDefinition property)
        {
            IMethodReference getter = property.Getter;
            IMethodReference setter = property.Setter;

            if (getter != null)
                AddMemberReference(getter.ResolvedMethod);
            if (setter != null)
                AddMemberReference(setter.ResolvedMethod);

            base.Visit(property);
        }
开发者ID:dsgouda,项目名称:buildtools,代码行数:12,代码来源:ImplClosureVisitor.cs

示例8: Create

		/// <summary>
		/// Creates the a <see cref="Column"/>.
		/// </summary>
		/// <param name="context">The <see cref="IMansionContext"/>.</param>
		/// <param name="table">The <see cref="Table"/> to which the column will be added.</param>
		/// <param name="property">The <see cref="IPropertyDefinition"/>.</param>
		/// <returns>Returns the created <see cref="Column"/>.</returns>
		/// <exception cref="ArgumentNullException">Thrown if one of the parameters is null.</exception>
		public Column Create(IMansionContext context, Table table, IPropertyDefinition property)
		{
			// validate arguments
			if (context == null)
				throw new ArgumentNullException("context");
			if (property == null)
				throw new ArgumentNullException("property");
			if (table == null)
				throw new ArgumentNullException("table");

			// invoke template method
			return DoCreate(context, table, property);
		}
开发者ID:Erikvl87,项目名称:Premotion-Mansion,代码行数:21,代码来源:ColumnDescriptor.cs

示例9: Create

		/// <summary>
		/// Creates the <see cref="Table"/> from the descriptor.
		/// </summary>
		/// <param name="context">The <see cref="IMansionContext"/>.</param>
		/// <param name="schema">The <see cref="Schema"/>in which to create the table.</param>
		/// <param name="property">The <see cref="IPropertyDefinition"/>.</param>
		/// <exception cref="ArgumentNullException">Thrown if one of the parameters is null.</exception>
		public void Create(IMansionContext context, Schema schema, IPropertyDefinition property)
		{
			// validate arguments
			if (context == null)
				throw new ArgumentNullException("context");
			if (schema == null)
				throw new ArgumentNullException("schema");
			if (property == null)
				throw new ArgumentNullException("property");

			// invoke template method
			DoCreate(context, schema, property);
		}
开发者ID:Erikvl87,项目名称:Premotion-Mansion,代码行数:20,代码来源:PropertyTableDescriptor.cs

示例10: WriteAccessorDefinition

        private void WriteAccessorDefinition(IPropertyDefinition property, IMethodDefinition accessor, string accessorType)
        {
            WriteSpace();
            WriteAttributes(accessor.Attributes, writeInline: true);
            // If the accessor is an internal call (or a PInvoke) we should put those attributes here as well

            WriteMethodPseudoCustomAttributes(accessor);

            if (accessor.Visibility != property.Visibility)
                WriteVisibility(accessor.Visibility);
            WriteKeyword(accessorType, noSpace: true);
            WriteMethodBody(accessor);
        }
开发者ID:pgavlin,项目名称:ApiTools,代码行数:13,代码来源:CSDeclarationWriter.Properties.cs

示例11: Aggregate

        /// <summary>
        /// Calculates the maximum
        /// </summary>
        public FuncParameter Aggregate(IEnumerable<IComparable> myValues, IPropertyDefinition myPropertyDefinition)
        {
            IComparable max = null;

            foreach (var value in myValues)
            {
                if (max == null)
                {
                    max = value;
                }
                else if (max.CompareTo(value) < 0)
                {
                    max = value;
                }
            }

            return new FuncParameter(max, myPropertyDefinition);
        }
开发者ID:anukat2015,项目名称:sones,代码行数:21,代码来源:MaxAggregate.cs

示例12: DoAddMappingTo

		/// <summary>
		/// Adds <see cref="PropertyMapping"/>s of <paramref name="property"/> to the given <paramref name="typeMapping"/>.
		/// </summary>
		/// <param name="context">The <see cref="IMansionContext"/>.</param>
		/// <param name="property">The <see cref="IPropertyDefinition"/> of the property for which to add the <see cref="PropertyMapping"/>s.</param>
		/// <param name="typeMapping">The <see cref="TypeMapping"/> to which to add the new <see cref="PropertyMapping"/>s.</param>
		protected override void DoAddMappingTo(IMansionContext context, IPropertyDefinition property, TypeMapping typeMapping)
		{
			typeMapping.Add(new SingleValuedPropertyMapping("approved")
			                {
			                	Type = "boolean"
			                });
			typeMapping.Add(new SingleValuedPropertyMapping("archived")
			                {
			                	Type = "boolean"
			                });
			typeMapping.Add(new SingleValuedPropertyMapping("publicationDate")
			                {
			                	Type = "date"
			                });
			typeMapping.Add(new SingleValuedPropertyMapping("expirationDate")
			                {
			                	Type = "date"
			                });
		}
开发者ID:Erikvl87,项目名称:Premotion-Mansion,代码行数:25,代码来源:PublicationStatusPropertyMappingDescriptor.cs

示例13: Aggregate

        /// <summary>
        /// Calculates the average
        /// </summary>
        public FuncParameter Aggregate(IEnumerable<IComparable> myValues, IPropertyDefinition myPropertyDefinition)
        {
            var divType = myPropertyDefinition.BaseType;
            IComparable sum = null;
            uint total = 0;

            foreach (var value in myValues)
            {
                if (sum == null)
                {
                    sum = ArithmeticOperations.Add(divType, 0, value);
                }
                else
                {
                    sum = ArithmeticOperations.Add(divType, sum, value);
                }

                total++;
            }

            var aggregateResult = ArithmeticOperations.Div(typeof(Double), sum, total);

            return new FuncParameter(aggregateResult, myPropertyDefinition);
        }
开发者ID:anukat2015,项目名称:sones,代码行数:27,代码来源:AvgAggregate.cs

示例14: onMetadataElement

 public virtual void onMetadataElement(IPropertyDefinition propertyDefinition) { }
开发者ID:lleraromero,项目名称:bytecodetranslator,代码行数:1,代码来源:Translator.cs

示例15: Visit

 public override void Visit(IPropertyDefinition property)
 {
     if (IsMemberExternallyVisible2(property))
     {
         // Recursion
         Visit(property.Parameters);
         Visit(property.Type);
     }
 }
开发者ID:natemcmaster,项目名称:buildtools,代码行数:9,代码来源:ApiClosureVisitor.cs


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