Run() public method

public Run ( ) : void
return void
Example #1
0
        async static Task Client()
        {
            using (var channel = new FastIpc(PIPE_NAME, false, null))
            {
                Proxy <Foo> fooProxy = await channel.Activate <Foo>();

                int remoteProcessID = await fooProxy.Eval(foo => foo.ProcessID);

                Console.WriteLine($"Remote process ID: {remoteProcessID}");

                int sum = await fooProxy.Eval(f1 => f1.Add(2, 2));

                Console.WriteLine($"Sum: {sum}");

                int sum2 = await fooProxy.Eval(f1 => f1.AddAsync(3, 3));

                Console.WriteLine($"Async Sum: {sum2}");

                #region Automatic Marshaling Demonstration

                Proxy <Bar> barProxy = await channel.Activate <Bar>();

                Proxy <Foo> fooProxy2 = await barProxy.Eval(b => b.GetFoo());

                int sum3 = await fooProxy2.Eval(f2 => f2.Add(4, 4));

                Console.WriteLine($"Sum from foo proxy #2: {sum3}");

                await barProxy.Run(b => b.PrintFoo(fooProxy2));

                await barProxy.Run(b => b.PrintFoo(new Foo()));

                #endregion
            }
        }
Example #2
0
        /// <summary>
        /// Executes the extension.
        /// </summary>
        public bool Run()
#endif
        {
            AppDomain currentDomain = AppDomain.CurrentDomain;

            if (currentDomain != null)
            {
                currentDomain.AssemblyResolve += new ResolveEventHandler(currentDomain_AssemblyResolve);
            }

#if (REVIT)
            return(Proxy.Execute(commandData, ref message, elements));
#else
            return(Proxy.Run());
#endif
        }
Example #3
0
 public void Run()
 {
     proxy.Run();
 }