示例#1
0
 public static ProxyFactory GetInstance( String Context )
 {
     ProxyFactory factory = null;
     try
     {
         factory = ProxyFactory.InstanceMap[ Context ];
     }
     catch ( Exception )
     {
         factory = new ProxyFactory( Context );
         ProxyFactory.InstanceMap.Add( Context, factory );
     }
     return factory;
 }
示例#2
0
文件: Facade.cs 项目: atothek1/oase
        public virtual IFacade Initialize( Dictionary<String, Object> initProperties )
        {
            if( this.Initialized ) return this;
            this.Initialized  = true;

            #if DEBUG
            Debug.WriteLine( this + ".Initialize();\n\tName: " + this.Name + ";\n\tContext: " + this.Context + "\n---" );
            #endif

            // store the init Properties
            this.initProperties	= initProperties;

            // get the core components into the application context
            this.notifier 			= Notifier.getInstance( this.Context );
            this.proxyFactory 		= ProxyFactory.GetInstance( this.Context );
            this.mediatorFactory 	= MediatorFactory.GetInstance( this.Context );

            // lookup for possible NotificationCommandInterests, and add them to the notifier Instance
            NotificationAttributeParser.GetInstance().ParseCommandInterestAttributes( this.Context );

            // initialize the core components of the framework
            ( this.notifier as Notifier ).Initialize();
            this.proxyFactory.Initialize();
            this.mediatorFactory.Initialize();

            // after looking up for interests add them to the notifier add Notification interests to the Notifier object
            this.Add( this.NotificationListenerList );

            return this;
        }