Esempio n. 1
0
        private ObjectDef buildObjectDef(DiagnosticLevel diagnosticLevel)
        {
            var topDef = Top.As <IContainerModel>().ToObjectDef(diagnosticLevel);

            if (diagnosticLevel == DiagnosticLevel.FullRequestTracing && !IsPartialOnly)
            {
                var objectDef = new ObjectDef(typeof(DiagnosticBehavior))
                {
                    Name = UniqueId.ToString()
                };

                objectDef.DependencyByType <IActionBehavior>(topDef);

                topDef.Name = Guid.NewGuid().ToString();

                var list = new List <ObjectDef>();
                var def  = topDef;
                while (def != null)
                {
                    list.Add(def);
                    def = def.FindDependencyDefinitionFor <IActionBehavior>();
                }

                return(objectDef);
            }

            return(topDef);
        }
Esempio n. 2
0
 protected ObjectDef buildObjectDef()
 {
     return Top.As<IContainerModel>().ToObjectDef();
 }
Esempio n. 3
0
 void IRegisterable.Register(Action <Type, ObjectDef> callback)
 {
     callback(typeof(IActionBehavior), Top.As <IContainerModel>().ToObjectDef());
     Authorization.As <IAuthorizationRegistration>().Register(Top.UniqueId, callback);
 }
Esempio n. 4
0
 Instance IContainerModel.ToInstance()
 {
     return(Top.As <IContainerModel>().ToInstance());
 }