/// <param name="link">IEvent instance</param>
 public SEvent2(IEvent2 o)
 {
     link = o;
     if(link == null) {
         link = new SEvent2Empty();
     }
 }
Example #2
0
 /// <param name="o">IEvent instance</param>
 public SEvent2(IEvent2 o)
 {
     link = o;
     if (link == null)
     {
         link = new SEvent2Empty();
     }
 }
        /// <summary>
        /// Initialize library
        /// </summary>
        /// <returns></returns>
        protected bool init()
        {
            if (!Exists)
            {
                Log.Debug(String.Format("The Client library '{0}' is not found.", FullName));
                return(false);
            }

            Assembly          lib = prepare(FullName);
            IEntryPointClient epc = Instance <IEntryPointClient> .from(lib);

            epc.Version = new API.Version();
            epc.Core    = core;

            switch (epc.Type)
            {
            case ClientType.Dte2: {
                epc.load(dte2);
                break;
            }

            case ClientType.Isolated: {
                epc.load(solutionFile, properties);
                break;
            }

            case ClientType.Empty: {
                epc.load();
                break;
            }
            }

            cevent = new SEvent2(epc.Event);
            cbuild = new SBuild(epc.Build);

            return(true);
        }
        /// <summary>
        /// Initialize library
        /// </summary>
        /// <param name="lib"></param>
        /// <returns></returns>
        protected bool init()
        {
            if(!Exists) {
                Log.Debug(String.Format("The Client library '{0}' is not found.", FullName));
                return false;
            }

            Assembly lib            = prepare(FullName);
            IEntryPointClient epc   = Instance<IEntryPointClient>.from(lib);

            epc.Version = new API.Version();
            epc.Core    = core;

            switch(epc.Type)
            {
                case ClientType.Dte2: {
                    epc.load(dte2);
                    break;
                }
                case ClientType.Isolated: {
                    epc.load(solutionFile, properties);
                    break;
                }
                case ClientType.Empty: {
                    epc.load();
                    break;
                }
            }

            cevent = new SEvent2(epc.Event);
            cbuild = new SBuild(epc.Build);

            return true;
        }