/// <summary> /// Gets the InstanceQueue for the specified type. /// </summary> /// <param name="instanceType">Type of the instance.</param> /// <returns></returns> public IInstanceQueue GetInstanceQueue(Type instanceType) { if (!InstanceQueues.ContainsKey(instanceType)) { throw new ArgumentException("Attempting to access type [" + instanceType.FullName + "] that has not been defined for PersistenceQueue.\n" + "You must configure the type information for this type before using it in the PersistenceQueue.\n" + "Types are usually configured by the PersistenceConfiguration.ConfigurePersistenceQueue() method.\n"); } return(InstanceQueues[instanceType]); }
/// <summary> /// Adds a new InstanceQueue from a builder. /// </summary> /// <param name="builder">The builder.</param> public void AddInstanceQueue(IInstanceQueueBuilder builder) { // Record order they were added so we can insert them into the database in the same order. Type entityType = builder.GetInstanceType(); TypeOrder.Add(entityType); // Add the new InstanceQueue for this type. IInstanceQueue instanceQueue = builder.build(); instanceQueue.ParentQueue = this; InstanceQueues.Add(entityType, instanceQueue); }