예제 #1
0
 public ToDoEventHandlers(IIdentityMapper identityMapper, IEventNotifier notifier)
 {
     Contract.Requires <ArgumentNullException>(identityMapper != null, "identityMapper");
     Contract.Requires <ArgumentNullException>(notifier != null, "notifier");
     _identityMapper = identityMapper;
     this.notifier   = notifier;
 }
예제 #2
0
 public UserEventHandlers(IIdentityMapper identityMapper, IImageConverter imageConverter)
 {
     Contract.Requires <ArgumentNullException>(identityMapper != null, "identityMapper");
     Contract.Requires <ArgumentNullException>(imageConverter != null, "imageStringConverter");
     _identityMapper = identityMapper;
     _imageConverter = imageConverter;
 }
        public UpstreamConnection(string loginUri, string gridName)
        {
            this.client = new GridClient();
            client.Settings.LOGIN_SERVER  = loginUri;
            client.Settings.MULTIPLE_SIMS = false;

            mapper           = new SyncAsyncMapper(new IdentityMapperAsync(client, gridName));
            oneOnOnesessions = new Dictionary <UUID, UUID>();
        }
예제 #4
0
 public LegacyDatabase(IIdentityMapper identityMapper)
 {
     _identityMapper = identityMapper;
     Context = new ToDoContext();
     //Context.Configuration.AutoDetectChangesEnabled = false;
     // Lazy loading is turned off
     Context.Configuration.LazyLoadingEnabled = false;
     Context.Database.Log = s => { System.Diagnostics.Debug.WriteLine(s); }; ;
 }
 public GroupChannel(GridClient client, IIdentityMapper mapper, Group group)
 {
     slName      = group.Name;
     ircName     = mapper.MapGroup(group);
     topic       = slName;
     this.mapper = mapper;
     this.client = client;
     this.group  = group;
 }
예제 #6
0
 public LegacyDatabase(IIdentityMapper identityMapper)
 {
     _identityMapper = identityMapper;
     Context         = new DisciturContext();
     //Context.Configuration.AutoDetectChangesEnabled = false;
     // Lazy loading is turned off
     Context.Configuration.LazyLoadingEnabled = true;
     Context.Database.Log = s => { System.Diagnostics.Debug.WriteLine(s); };;
 }
 public GroupChannel(GridClient client, IIdentityMapper mapper, Group group)
 {
     slName = group.Name;
     ircName = mapper.MapGroup(group);
     topic = slName;
     this.mapper = mapper;
     this.client = client;
     this.group = group;
 }
        public FriendsList(IUpstreamConnection connection, Irc.IRawMessageConnection downstream, Configuration conf)
        {
            this.downstream = downstream;
            this.client = connection.Client;
            this.mapper = connection.Mapper;
            this.config = conf;
            client.Friends.FriendOnline += GridClient_FriendPresenceChanged;
            client.Friends.FriendOffline += GridClient_FriendPresenceChanged;

            downstream.Register(this);
        }
예제 #9
0
        public FriendsList(IUpstreamConnection connection, Irc.IRawMessageConnection downstream, Configuration conf)
        {
            this.downstream               = downstream;
            this.client                   = connection.Client;
            this.mapper                   = connection.Mapper;
            this.config                   = conf;
            client.Friends.FriendOnline  += GridClient_FriendPresenceChanged;
            client.Friends.FriendOffline += GridClient_FriendPresenceChanged;

            downstream.Register(this);
        }
예제 #10
0
        public Database(IIdentityMapper identityMapper)
        {
            Contract.Requires <ArgumentNullException>(identityMapper != null, "identityMapper");
            _identityMapper = identityMapper;

            Context = new DisciturContext();
            //Context.Configuration.AutoDetectChangesEnabled = false;
            // Lazy loading is turned off
            //Context.Configuration.LazyLoadingEnabled = false;
            Context.Database.Log = s => { System.Diagnostics.Debug.WriteLine(s); };;
        }
예제 #11
0
        public Database(IIdentityMapper identityMapper)
        {
            Contract.Requires<ArgumentNullException>(identityMapper != null, "identityMapper");
            _identityMapper = identityMapper;

            Context = new DisciturContext();
            //Context.Configuration.AutoDetectChangesEnabled = false;
            // Lazy loading is turned off
            //Context.Configuration.LazyLoadingEnabled = false;
            Context.Database.Log = s => { System.Diagnostics.Debug.WriteLine(s); }; ;
        }
예제 #12
0
        public ClientConnection(Socket connection, IUpstreamConnection upstream, IIdentityMapper mapper)
        {
            this.connection  = connection;
            this.upstream    = upstream;
            this.mapper      = mapper;
            this.channels    = new ConcurrentDictionary <string, IChannel>();
            this.handlers    = new HashSet <IRawMessageHandler>();
            handlerCallbacks = new Dictionary <string, RawMessageHandler>();

            upstream.ReceiveMessage    += ReceiveUpstreamMessage;
            upstream.ChannelListLoaded += ChannelListLoaded;
        }
        public ClientConnection(Socket connection, IUpstreamConnection upstream, IIdentityMapper mapper)
        {
            this.connection = connection;
            this.upstream = upstream;
            this.mapper = mapper;
            this.channels = new ConcurrentDictionary<string, IChannel>();
            this.handlers = new HashSet<IRawMessageHandler>();
            handlerCallbacks = new Dictionary<string, RawMessageHandler>();

            upstream.ReceiveMessage += ReceiveUpstreamMessage;
            upstream.ChannelListLoaded += ChannelListLoaded;
        }
        public LocalChannel(OpenMetaverse.GridClient client, IIdentityMapper mapper)
        {
            this.client = client;
            this.mapper = mapper;
            this.nearby = new Dictionary<string, Dictionary<UUID, ChannelMembership>>();

            var selfmember = new ChannelMembership();
            selfmember.IsOperator = false;
            selfmember.Position = PositionCategory.Whisper;
            selfmember.Subject = mapper.MapUser(client.Self.AgentID, client.Self.Name);

            var thissimlist = new Dictionary<UUID, ChannelMembership>();
            thissimlist.Add(client.Self.AgentID, selfmember);
            nearby.Add(client.Network.CurrentSim.Name, thissimlist);

            client.Grid.CoarseLocationUpdate += OnLocationUpdate;
            client.Self.ChatFromSimulator += OnLocalChat;
        }
예제 #15
0
        public LocalChannel(OpenMetaverse.GridClient client, IIdentityMapper mapper)
        {
            this.client = client;
            this.mapper = mapper;
            this.nearby = new Dictionary <string, Dictionary <UUID, ChannelMembership> >();

            var selfmember = new ChannelMembership();

            selfmember.IsOperator = false;
            selfmember.Position   = PositionCategory.Whisper;
            selfmember.Subject    = mapper.MapUser(client.Self.AgentID, client.Self.Name);

            var thissimlist = new Dictionary <UUID, ChannelMembership>();

            thissimlist.Add(client.Self.AgentID, selfmember);
            nearby.Add(client.Network.CurrentSim.Name, thissimlist);

            client.Grid.CoarseLocationUpdate += OnLocationUpdate;
            client.Self.ChatFromSimulator    += OnLocalChat;
        }
 public IdentityRepositoryBase(IIdentityMapper <T> map_factory)
 {
     Mapper = map_factory;
 }
예제 #17
0
        public static IDictionary <EntityStatus, ICollection <LessonFeedback> > ToDictionary(this ICollection <FeedbackViewModel> feedBacks, IIdentityMapper maps)
        {
            IDictionary <EntityStatus, ICollection <LessonFeedback> > feedbackDict = new Dictionary <EntityStatus, ICollection <LessonFeedback> >();

            foreach (var item in feedBacks)
            {
                EntityStatus status = item.Status.ParseEnum <EntityStatus>();
                if (!status.Equals(EntityStatus.I))
                {
                    if (!feedbackDict.ContainsKey(status))
                    {
                        feedbackDict.Add(status, new List <LessonFeedback>());
                    }
                    feedbackDict[status].Add(
                        new LessonFeedback()
                    {
                        Id = item.LessonFeedbackId == null ?
                             Guid.NewGuid() : maps.GetAggregateId <LessonFeedback>(item.LessonFeedbackId.Value),
                        Feedback = item.Feedback,
                        Nature   = item.Nature
                    }
                        );
                }
            }
            return(feedbackDict);
        }
예제 #18
0
 public IdentityVisitor(IIdentityMapper mapper)
 {
     _mapper = mapper;
 }
예제 #19
0
 public LessonEventHandlers(IIdentityMapper identityMapper)
 {
     //Guard clauses
     Contract.Requires <ArgumentNullException>(identityMapper != null, "identityMapper");
     _identityMapper = identityMapper;
 }
예제 #20
0
 public ToDoEventHandlers(IIdentityMapper identityMapper)
 {
     _identityMapper = identityMapper;
 }