Пример #1
0
        public void ExecutePrepareRuleGenerate()
        {
            if (DataSource != null)
            {
                var t   = DataSource as ObservableCollection <FileSearchItem>;
                var src = t.Where(c => c.IsSelected).Select(c => c.Path).ToList();
                VMMain.Instance.VMAutoRuleGenerator.FilePaths = src;
            }

            VMMain.Instance.VMAutoRuleGenerator.KeyWord              = SearchWord;
            VMMain.Instance.VMAutoRuleGenerator.androidDevice        = androidDevice;
            VMMain.Instance.VMAutoRuleGenerator.androidFileExtracter = androidFileExtracter;
            if (ObserverPath != null)
            {
                if (ObserverPath.Last() != '\\')
                {
                    ObserverPath += '\\';
                }
                VMMain.Instance.VMAutoRuleGenerator.TargetRootPath = ObserverPath.Replace('\\', '/');
            }
            else
            {
                VMMain.Instance.VMAutoRuleGenerator.TargetRootPath = "";
            }
        }
Пример #2
0
        public void Equatable_by_path()
        {
            var ref1 = new ObserverRef(ObserverPath.From("42"), null);
            var ref2 = new ObserverRef(ObserverPath.From("42"), null);

            Assert.True(ref1 == ref2);
            Assert.True(ref1.Equals(ref2));
        }
Пример #3
0
        ObserverEndpoint Initialize(IObserverEndpoint proxy)
        {
            this.proxy = proxy;

            var path = new ObserverPath(IdentityOf(proxy));

            Self = ActorSystem.Instance.ObserverOf(path);

            return(this);
        }
Пример #4
0
        ObserverRef IActorSystem.ObserverOf(ObserverPath path)
        {
            if (observers.ContainsKey(path))
                return observers[path];

            var stub = new ObserverRefStub(path);
            observers.Add(path, stub);

            return stub;
        }
Пример #5
0
 internal static IObserverEndpoint Proxy(ObserverPath path)
 {
     return(ObserverEndpointFactory.Cast(GrainReference.FromKeyString(path.ToString())));
 }
Пример #6
0
 public ObserverRefStub(ObserverPath path)
     : base(path)
 {
 }
Пример #7
0
 protected ObserverStub()
     : base(new ObserverRefStub(ObserverPath.From(Guid.NewGuid().ToString("D"))))
 {
 }
 public ObserverRef ObserverOf(ObserverPath path)
 {
     return(system.ObserverOf(path));
 }