RaiseLevel() public method

public RaiseLevel ( ) : void
return void
Example #1
0
        public void OverrideInstance(object instance)
        {
            StateCommuter.RaiseLevel();
            StateCommuter.Current.Instance = instance;

            var collection = instance as ICollection;

            if (collection != null)
            {
                StateCommuter.Current.Collection = collection;
            }
        }
Example #2
0
        public ObjectAssembler(IRuntimeTypeSource typeSource, IValueContext valueContext, Settings settings = null)
            : this(new StackingLinkedList <Level>(), typeSource, GetLifecycleListener(settings), valueContext)
        {
            this.valueContext = valueContext;
            Guard.ThrowIfNull(typeSource, nameof(typeSource));

            TypeSource = typeSource;
            StateCommuter.RaiseLevel();

            rootInstance = settings?.RootInstance;
            var rootInstanceType = rootInstance?.GetType();

            rootInstanceXamlType = rootInstanceType != null?TypeSource.GetByType(rootInstanceType) : null;
        }
Example #3
0
        public ObjectAssembler(IWiringContext wiringContext, ITopDownValueContext topDownValueContext, ObjectAssemblerSettings settings = null)
            : this(new StackingLinkedList <Level>(), wiringContext, topDownValueContext)
        {
            Guard.ThrowIfNull(wiringContext, nameof(wiringContext));
            Guard.ThrowIfNull(topDownValueContext, nameof(topDownValueContext));

            this.topDownValueContext = topDownValueContext;
            StateCommuter.RaiseLevel();

            rootInstance = settings?.RootInstance;
            var rootInstanceType = rootInstance?.GetType();

            rootInstanceXamlType = rootInstanceType != null?wiringContext.TypeContext.TypeRepository.GetXamlType(rootInstanceType) : null;
        }