Ejemplo n.º 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 = "";
            }
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 3
0
        ObserverEndpoint Initialize(IObserverEndpoint proxy)
        {
            this.proxy = proxy;

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

            Self = ActorSystem.Instance.ObserverOf(path);

            return(this);
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 5
0
 internal static IObserverEndpoint Proxy(ObserverPath path)
 {
     return(ObserverEndpointFactory.Cast(GrainReference.FromKeyString(path.ToString())));
 }
Ejemplo n.º 6
0
 public ObserverRefStub(ObserverPath path)
     : base(path)
 {
 }
Ejemplo n.º 7
0
 protected ObserverStub()
     : base(new ObserverRefStub(ObserverPath.From(Guid.NewGuid().ToString("D"))))
 {
 }
 public ObserverRef ObserverOf(ObserverPath path)
 {
     return(system.ObserverOf(path));
 }