本文整理汇总了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;
}
}
示例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()]);
}
示例3: ToArray
public static object[] ToArray(IEnumerator tests, IArrayFactory factory)
{
Collection4 elements = new Collection4(tests);
return elements.ToArray(factory.NewArray(elements.Size()));
}
示例4: Collect
public virtual IReflectClass[] Collect()
{
Collection4 classes = new Collection4();
CollectKnownClasses(classes);
return (IReflectClass[])classes.ToArray(new IReflectClass[classes.Size()]);
}
示例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;
}
示例6: ToStaticFieldArray
private StaticField[] ToStaticFieldArray(Collection4 fields)
{
return (StaticField[]) fields.ToArray(new StaticField[fields.Size()]);
}
示例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;
}
}
示例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;
}
示例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())."
);
}
}
}