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


C# Collection4.ToArray方法代码示例

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


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

示例1: ToArray

		public virtual IConstraint[] ToArray()
		{
			lock (_cluster)
			{
				Collection4 all = new Collection4();
				for (int i = 0; i < _constraints.Length; i++)
				{
					ClusterConstraint c = (ClusterConstraint)_constraints[i];
					for (int j = 0; j < c._constraints.Length; j++)
					{
						all.Add(c._constraints[j]);
					}
				}
				IConstraint[] res = new IConstraint[all.Size()];
				all.ToArray(res);
				return res;
			}
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:18,代码来源:ClusterConstraints.cs

示例2: Concat

		// Simple
		// Collection
		// Complex
		// General
		//regression
		protected virtual Type[] Concat(Type[] x, Type[] y)
		{
			Collection4 c = new Collection4(x);
			c.AddAll(y);
			return (Type[])c.ToArray(new Type[c.Size()]);
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:11,代码来源:DrsTestSuite.cs

示例3: ToArray

		public static object[] ToArray(IEnumerator tests, IArrayFactory factory)
		{
			Collection4 elements = new Collection4(tests);
			return elements.ToArray(factory.NewArray(elements.Size()));
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:5,代码来源:Iterators.cs

示例4: Collect

		public virtual IReflectClass[] Collect()
		{
			Collection4 classes = new Collection4();
			CollectKnownClasses(classes);
			return (IReflectClass[])classes.ToArray(new IReflectClass[classes.Size()]);
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:6,代码来源:KnownClassesCollector.cs

示例5: ToClassAspectArray

 private ClassAspect[] ToClassAspectArray(Collection4 aspects)
 {
     var array = new ClassAspect[aspects.Size()];
     aspects.ToArray(array);
     for (var i = 0; i < array.Length; i++)
     {
         array[i].SetHandle(i);
     }
     return array;
 }
开发者ID:masroore,项目名称:db4o,代码行数:10,代码来源:ClassMetadata.cs

示例6: ToStaticFieldArray

 private StaticField[] ToStaticFieldArray(Collection4 fields)
 {
     return (StaticField[]) fields.ToArray(new StaticField[fields.Size()]);
 }
开发者ID:masroore,项目名称:db4o,代码行数:4,代码来源:ClassMetadata.cs

示例7: GetStoredFields

 public virtual IStoredField[] GetStoredFields()
 {
     lock (Lock())
     {
         if (_aspects == null)
         {
             return new IStoredField[0];
         }
         var storedFields = new Collection4();
         TraverseDeclaredFields(new _IProcedure4_1039(storedFields));
         var fields = new IStoredField[storedFields.Size()];
         storedFields.ToArray(fields);
         return fields;
     }
 }
开发者ID:masroore,项目名称:db4o,代码行数:15,代码来源:ClassMetadata.cs

示例8: ToConstraint

 internal virtual IConstraint ToConstraint(Collection4 constraints)
 {
     if (constraints.Size() == 1)
     {
         return (IConstraint) constraints.SingleElement();
     }
     if (constraints.Size() > 0)
     {
         var constraintArray = new IConstraint[constraints.Size()];
         constraints.ToArray(constraintArray);
         return new QConstraints(_trans, constraintArray);
     }
     return null;
 }
开发者ID:masroore,项目名称:db4o,代码行数:14,代码来源:QQueryBase.cs

示例9: ValidateTranslatorAspects

		private void ValidateTranslatorAspects(Collection4 aspects)
		{
			if (HasIncompatibleTranslatorAspect(aspects))
			{
				if (!ConfigImpl().RecoveryMode())
				{
					string newLine = Runtime.GetProperty("line.separator");
					throw new Db4oFatalException("Class " + GetName() + " was used with and without translators configured. Found aspects:"
						 + newLine + Arrays4.ToString(aspects.ToArray()) + newLine + "No changes were made to the database. "
						 + newLine + "If you want to run with this configuration you can configure recovery mode (see FileConfiguration#recoveryMode())."
						);
				}
			}
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:14,代码来源:ClassMetadata.cs


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