Exemplo n.º 1
0
 public EventContext(TServiceInterface service, EventInfo eventInfo, Delegate handler)
 {
     myService         = service;
     EventInfo         = eventInfo;
     myHandler         = handler;
     SubscribedClients = new HashSet <string>();
 }
Exemplo n.º 2
0
        private static TServiceInterface GetMefService <TServiceInterface>() where TServiceInterface : class
        {
            TServiceInterface service = null;
            var componentModel        = GetService <IComponentModel, SComponentModel>(GlobalServiceProvider);

            if (componentModel != null)
            {
                service = componentModel.GetService <TServiceInterface>();
            }

            return(service);
        }
Exemplo n.º 3
0
        private TServiceInterface GetService <TServiceInterface, TService>()
            where TServiceInterface : class
            where TService : class
        {
            TServiceInterface service = null;

            if (parent != null)
            {
                service = parent.GetVsService <TServiceInterface, TService>();
            }

            return(service);
        }