Esempio n. 1
0
        public object GetInstance(InstanceContext instanceContext, Message message)
        {
            if (message == null)
            {
                throw new ApplicationException("Empty message");
            }
            var s = message.Headers.GetHeader <string>(ChatRoom.ChatRoomNameHeader, Namespaces.HeaderNamespace);
            ChatsService <T> service = ((ServiceHostWithChats <T>)instanceContext.Host).ChatsService;

            service.PerfCounters.Count(PerfCounters.ChatCommands2ServerPerSecond);

            ClaimsPolicy.ServerCheck();

            return(service.Rooms[service.FindRoomWithCheck(s)]);
        }