Exemplo n.º 1
0
        List <FrameInfoPair> ToFrameInfoPairList(GetFramesWithInfoResponse response)
        {
            var frames = RemoteObjectUtils.CreateRemoteObjects(
                p => frameFactory.Create(connection, p),
                p => frameFactory.Delete(connection, p),
                response.FramesWithInfo.Select(p => p.Frame));

            return(response.FramesWithInfo.Zip(frames,
                                               (p, f) => new FrameInfoPair(f, FrameInfoUtils.CreateFrameInfo(
                                                                               p.Info, moduleFactory, connection))).ToList());
        }
Exemplo n.º 2
0
        public FrameInfo <SbModule>?GetInfo(FrameInfoFlags fields)
        {
            var request = new GetInfoRequest()
            {
                Frame  = grpcSbFrame,
                Fields = (uint)fields
            };
            GetInfoResponse response = null;

            if (connection.InvokeRpc(() =>
            {
                response = client.GetInfo(request);
            }))
            {
                if (response.Info != null)
                {
                    return(FrameInfoUtils.CreateFrameInfo(response.Info, moduleFactory, connection));
                }
            }
            return(null);
        }