Esempio n. 1
0
 public ClientManager(IOTAwareContext context, string name)
 {
     Name    = name;
     Id      = Guid.NewGuid();
     Clients = new List <ClientMetaData>();
     AddDocument(context);
 }
Esempio n. 2
0
        public void SetContent(IOTAwareContext ctx, object value)
        {
            var context = ctx as MultiCaretTextEditor;
            var content = value as string;

            context.Clear();
            context.InsertText(content, 0);
        }
Esempio n. 3
0
 protected override void Execute(Operation o, IOTAwareContext operationContext)
 {
     foreach (var manager in ManagerChain)
     {
         if (manager.TryExecute(operationContext, o))
         {
             return;
         }
     }
 }
Esempio n. 4
0
        protected override void Transform(Operation o, IOTAwareContext operationContext)
        {
            Operation copy = (Operation)o.Clone();

            lock (syncRoot)
            {
                outgoing.Select(x =>
                {
                    o = transformer.Transform(x, o);
                    return(transformer.Transform(copy, x));
                });
            }
        }
Esempio n. 5
0
        protected override void Execute(Operation o, IOTAwareContext operationContext)
        {
            foreach (var manager in ManagerChain)
            {
                if (manager.TryExecute(operationContext, o))
                {
                    o.ExecutedAt     = DateTime.Now;
                    o.ServerMessages = this.serverMessages;
                    operationContext.Log.Add(o);

                    if (OperationPerformed != null)
                    {
                        OperationPerformed(this, o);
                    }
                }
            }
        }
Esempio n. 6
0
 public ClientManager(IOTAwareContext context) : this(context, "")
 {
 }
Esempio n. 7
0
        public object GetContent(IOTAwareContext ctx)
        {
            var context = ctx as MultiCaretTextEditor;

            return(context.Editor.Text);
        }
Esempio n. 8
0
 protected override void Transform(Operation o, IOTAwareContext operationContext)
 {
     throw new NotImplementedException();
 }
Esempio n. 9
0
 protected abstract void Execute(Operation o, IOTAwareContext operationContext);
Esempio n. 10
0
 protected abstract void Transform(Operation o, IOTAwareContext operationContext);
Esempio n. 11
0
 public void AddDocument(IOTAwareContext document)
 {
     Documents[document.DocumentName] = document;
 }