示例#1
0
		// 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()]);
		}
示例#2
0
 internal virtual void InitializeAspects()
 {
     BitTrue(Const4.CheckedChanges);
     var aspects = new Collection4();
     if (null != _aspects)
     {
         aspects.AddAll(_aspects);
     }
     var customTypeHandler = Container().Handlers.ConfiguredTypeHandler(ClassReflector
         ());
     var dirty = IsDirty();
     if (InstallTranslator(aspects, customTypeHandler))
     {
         dirty = true;
     }
     if (Container().DetectSchemaChanges())
     {
         if (GenerateCommitTimestamps())
         {
             if (!HasCommitTimestampField())
             {
                 aspects.Add(Container().CommitTimestampIndex());
                 dirty = true;
             }
         }
         if (GenerateUUIDs())
         {
             if (!HasUUIDField())
             {
                 aspects.Add(Container().UUIDIndex());
                 dirty = true;
             }
         }
     }
     if (InstallCustomTypehandler(aspects, customTypeHandler))
     {
         dirty = true;
     }
     var defaultFieldBehaviour = _translator == null && customTypeHandler == null;
     if (Container().DetectSchemaChanges())
     {
         if (defaultFieldBehaviour)
         {
             if (CollectReflectFields(aspects))
             {
                 dirty = true;
             }
         }
         if (dirty)
         {
             _container.SetDirtyInSystemTransaction(this);
         }
     }
     if (dirty || !defaultFieldBehaviour)
     {
         _aspects = ToClassAspectArray(aspects);
     }
     var dp = _container._handlers.DiagnosticProcessor();
     if (dp.Enabled())
     {
         dp.CheckClassHasFields(this);
     }
     if (_aspects == null)
     {
         _aspects = new FieldMetadata[0];
     }
     InitializeConstructor(customTypeHandler);
     if (StateDead())
     {
         return;
     }
     _container.Callbacks().ClassOnRegistered(this);
     SetStateOK();
 }
示例#3
0
		private Collection4 NewCollection(string[] expected)
		{
			Collection4 c = new Collection4();
			c.AddAll(expected);
			return c;
		}
示例#4
0
 private IEnumerable NewIterable(int[] values)
 {
     var collection = new Collection4();
     collection.AddAll(IntArrays4.ToObjectArray(values));
     return collection;
 }