Exemplo n.º 1
0
        public SbModule GetModuleAtIndex(int index)
        {
            var request = new GetModuleAtIndexRequest()
            {
                Target = grpcSbTarget,
                Index  = index,
            };
            GetModuleAtIndexResponse response = null;

            if (connection.InvokeRpc(() =>
            {
                response = client.GetModuleAtIndex(request);
            }))
            {
                if (response.Module != null && response.Module.Id != 0)
                {
                    return(moduleFactory.Create(connection, response.Module));
                }
            }
            return(null);
        }
Exemplo n.º 2
0
 internal static FrameInfo <SbModule> CreateFrameInfo(GrpcFrameInfo info,
                                                      GrpcModuleFactory moduleFactory, GrpcConnection connection) =>
 new FrameInfo <SbModule>
 {
     AddrMax      = info.AddrMax,
     AddrMin      = info.AddrMin,
     Args         = info.Args,
     FuncName     = info.FuncName,
     Language     = info.Language,
     ModuleName   = info.ModuleName,
     ReturnType   = info.ReturnType,
     Flags        = info.Flags,
     ValidFields  = (FrameInfoFlags)info.ValidFields,
     HasDebugInfo = info.HasDebugInfo,
     StaleCode    = info.StaleCode,
     Module       = info.Module != null?moduleFactory.Create(connection, info.Module) : null
 };
Exemplo n.º 3
0
        public SbModule GetModule()
        {
            GetModuleResponse response = null;

            if (connection.InvokeRpc(() =>
            {
                response = client.GetModule(new GetModuleRequest()
                {
                    Frame = grpcSbFrame
                });
            }))
            {
                if (response.Module != null && response.Module.Id != 0)
                {
                    return(moduleFactory.Create(connection, response.Module));
                }
            }
            return(null);
        }