Пример #1
0
        public void InHere(AppDomainArgs args)
        {
            Console.WriteLine("In MEF Library2: AppDomain: {0}, args.StringArg: {1}",
                AppDomain.CurrentDomain.FriendlyName,
                args.StringArg);

            args.StringArg = "Leaving MEF Library2";
            Console.WriteLine("Library2 args set to {0}", args.StringArg);
        }
Пример #2
0
 public AppDomainArgs AppDomainArgHandler()
 {
     // Initialize our AppDomainArgs.
     if (AppDomain.CurrentDomain.FriendlyName != "Host_AppDomain") return null;
     if (appDomainArgs == null) {
         Console.WriteLine("Initializing instance of appDomainArgs in in AppDomain {0}", AppDomain.CurrentDomain.FriendlyName);
         appDomainArgs = new AppDomainArgs { StringArg = "Args initialized" };
         return appDomainArgs;
     }
     appDomainArgs.StringArg = string.Format("Run through AppDomainArgHandler in AppDomain {0}", AppDomain.CurrentDomain.FriendlyName);
     Console.WriteLine(appDomainArgs.StringArg);
     return appDomainArgs;
 }