Esempio n. 1
0
        private void LoadInitializers()
        {
            foreach (var initializer in ctx.CodingStyle.GetInitializers(Type))
            {
                try
                {
                    if (!Type.Equals(initializer.InitializedType))
                    {
                        throw new InitializedTypeDoNotMatchException(initializer, Type, initializer.InitializedType);
                    }

                    if (Initializer == null)
                    {
                        Initializer = new DomainObjectInitializer(ctx, initializer);
                    }
                    else
                    {
                        Initializer.AddGroup(initializer);
                    }
                }
                catch (TypeNotConfiguredException) { }
                catch (InitializedTypeDoNotMatchException) { }
                catch (ParameterTypesDoNotMatchException) { }
                catch (IdenticalSignatureAlreadyAddedException) { }
            }
        }