public override bool TryGetMember(GetMemberBinder binder, out object result)
        {
            var instanceProperty = m_instance.GetInstanceProperty <object>(binder.Name);

            instanceProperty.ThrowIfNull($"Member {binder.Name} is null!");
            result = new GameLoopDynamicProxy <object>(instanceProperty, m_methodCallContext).ActLike(binder.ReturnType);
            return(true);
        }
예제 #2
0
 public SynchronizedSpaceEngineers(ISpaceEngineers se, MethodCallContext methodCallContext)
 {
     Character = new GameLoopDynamicProxy <ICharacterController>(se.Character, methodCallContext)
                 .ActLike <ICharacterController>();
     Session = new GameLoopDynamicProxy <ISessionController>(se.Session, methodCallContext)
               .ActLike <ISessionController>();
     Items       = new GameLoopDynamicProxy <IItems>(se.Items, methodCallContext).ActLike <IItems>();
     Observer    = new GameLoopDynamicProxy <IObserver>(se.Observer, methodCallContext).ActLike <IObserver>();
     Definitions = new GameLoopDynamicProxy <IDefinitions>(se.Definitions, methodCallContext)
                   .ActLike <IDefinitions>();
     Blocks = new GameLoopDynamicProxy <IBlocks>(se.Blocks, methodCallContext).ActLike <IBlocks>();
     Admin  = new GameLoopDynamicProxy <ISpaceEngineersAdmin>(se.Admin, methodCallContext)
              .ActLike <ISpaceEngineersAdmin>();
     Screens = new GameLoopDynamicProxy <IScreens>(se.Screens, methodCallContext).ActLike <IScreens>();
 }