コード例 #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;
 }
コード例 #3
0
        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); }; ;
 }
コード例 #5
0
 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); };;
 }
コード例 #7
0
 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;
 }
コード例 #8
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);
        }
コード例 #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
ファイル: Database.cs プロジェクト: jrgcubano/disciturCQRSES
        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;
        }
コード例 #13
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;
        }
コード例 #14
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;
        }
コード例 #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;
 }