示例#1
0
        public void SetConnection(DdpConnection connection)
        {
            if (this.connection != null)
            {
                this.connection.OnAdded       -= Add;
                this.connection.OnRemoved     -= Remove;
                this.connection.OnChanged     -= Change;
                this.connection.OnAddedBefore -= AddBefore;
                this.connection.OnMovedBefore -= MoveBefore;
                this.connection = null;
            }

            if (connection != null)
            {
                this.connection                = connection;
                this.connection.OnAdded       += Add;
                this.connection.OnRemoved     += Remove;
                this.connection.OnChanged     += Change;
                this.connection.OnAddedBefore += AddBefore;
                this.connection.OnMovedBefore += MoveBefore;
            }
        }
示例#2
0
 public DdpAccount(DdpConnection connection)
 {
     this.connection = connection;
 }
 public WebSocketSystemNet(DdpConnection ddpConnection, string url)
 {
     this.ddpConnection = ddpConnection;
     uri = new Uri(url);
 }
示例#4
0
 public LocalDB(Func <LocalDB, string, DocumentCollection> CreateCollection, DdpConnection connection)
 {
     this.CreateCollection = CreateCollection;
     SetConnection(connection);
 }