public static void RegisterConstructor(SequenceRedirectConstructor constructor) { int idx; if (TryFindConstructor(constructor.SequenceRedirectType, out idx)) { throw new ArgumentException(string.Format(Properties.Resources.SequenceRedirectFactory_RegisterConstructor_TypeAlreadyRegistered, constructor.SequenceRedirectType)); } else { if (TryFindConstructor(constructor.SequenceRedirectTypeName, out idx)) { throw new ArgumentException(string.Format(Properties.Resources.SequenceRedirectFactory_RegisterConstructor_NameAlreadyRegistered, constructor.SequenceRedirectTypeName)); } else { constructorList.Add(constructor); } } }
public static void UnregisterConstructor(SequenceRedirectConstructor constructor) { constructorList.Remove(constructor); }