Ejemplo n.º 1
0
 public ListResponse(DSLinkContainer link, int requestID,
                     string path, Node node)
     : base(link, requestID)
 {
     Path = path;
     Node = node;
 }
Ejemplo n.º 2
0
 public RemoteSubscriptionManager(DSLinkContainer link)
 {
     _link            = link;
     _subscriptions   = new Dictionary <string, Subscription>();
     _subIdToPath     = new Dictionary <int, string>();
     _realSubIdToPath = new Dictionary <int, string>();
     _subscriptionId  = new IncrementingIndex();
 }
Ejemplo n.º 3
0
 public InvokeResponse(DSLinkContainer link, int requestID,
                       string path, JArray columns,
                       JArray updates)
     : base(link, requestID)
 {
     Path    = path;
     Columns = columns;
     Updates = updates;
 }
Ejemplo n.º 4
0
 public InvokeRequest(int requestID, string path, Permission permission, JObject parameters,
                      Action <InvokeResponse> callback = null, DSLinkContainer link = null,
                      JArray columns = null) : base(requestID)
 {
     Path       = path;
     Permission = permission;
     Parameters = parameters;
     Callback   = callback;
     _link      = link;
     _columns   = columns;
 }
 public InvokeResponse(DSLinkContainer link, int requestId,
                       string path, JArray columns,
                       JArray updates, JObject meta, JObject error)
     : base(link, requestId)
 {
     Path    = path;
     Columns = columns;
     Updates = updates;
     Meta    = meta;
     Error   = error;
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Node constructor
        /// </summary>
        /// <param name="name">Name of Node</param>
        /// <param name="parent">Parent of Node</param>
        /// <param name="link">DSLink container of Node</param>
        /// <param name="className">Node class name</param>
        public Node(string name, Node parent, DSLinkContainer link, string className = "node")
        {
            if (name == null)
            {
                throw new ArgumentException("Name must not be null.");
            }

            ClassName = className;
            Parent    = parent;
            _children = new Dictionary <string, Node>();

            Configs        = new MetadataMap("$");
            Attributes     = new MetadataMap("@");
            PrivateConfigs = new MetadataMap("");

            Configs.OnSet    += UpdateSubscribers;
            Attributes.OnSet += UpdateSubscribers;

            _removedChildren = new List <Node>();
            _subscribers     = new List <int>();
            _streams         = new List <int>();
            _link            = link;

            _createInitialData();

            Value        = new Value();
            Value.OnSet += ValueSet;

            if (parent != null)
            {
                if (name.Equals(""))
                {
                    throw new ArgumentException("name");
                }

                Name = name;
                Path = (parent.Path.Equals("/") ? "" : parent.Path) + "/" + name;
            }
            else
            {
                Name = name;
                Path = "/" + name;
            }

            link?.Responder?.StreamManager?.OnActivateNode(this);
        }
 public StreamManager(DSLinkContainer link)
 {
     _link = link;
 }
 public Handshake(DSLinkContainer link)
 {
     _link       = link;
     _httpClient = new HttpClient();
 }
Ejemplo n.º 9
0
 public DSLinkRequester(DSLinkContainer link)
 {
     _link      = link;
     _requestId = new IncrementingIndex(1);
 }
Ejemplo n.º 10
0
 public SubscriptionManager(DSLinkContainer link)
 {
     _subscriptionToNode = new Dictionary <int, Node>();
     _link = link;
 }
Ejemplo n.º 11
0
 public Response(DSLinkContainer link, int requestID)
 {
     _link     = link;
     RequestID = requestID;
 }
Ejemplo n.º 12
0
 public DSLinkResponder(DSLinkContainer link) : base()
 {
     Link = link;
 }
 protected Response(DSLinkContainer link, int requestId)
 {
     _link      = link;
     _requestId = requestId;
 }