상속: global::ProtoBuf.IExtensible
예제 #1
0
            internal AppInfoCallback( JobID jobID, CMsgClientAppInfoResponse msg )
            {
                JobID = jobID;

                var list = new List<App>();

                list.AddRange( msg.apps.Select( a => new App( a, App.AppInfoStatus.OK ) ) );
                list.AddRange( msg.apps_unknown.Select( a => new App( a, App.AppInfoStatus.Unknown ) ) );

                AppsPending = msg.apps_pending;

                Apps = new ReadOnlyCollection<App>( list );
            }
예제 #2
0
 internal AppInfoCallback( SteamClient client, CMsgClientAppInfoResponse msg )
     : base( client )
예제 #3
0
                internal App( CMsgClientAppInfoResponse.App app, AppInfoStatus status )
                {
                    Status = status;
                    AppID = app.app_id;
                    ChangeNumber = app.change_number;
                    Sections = new Dictionary<EAppInfoSection, KeyValue>();

                    foreach ( var section in app.sections )
                    {
                        KeyValue kv = new KeyValue();

                        using ( MemoryStream ms = new MemoryStream( section.section_kv ) )
                        {
                            if ( kv.TryReadAsBinary( ms ) )
                            {
                                Sections.Add( ( EAppInfoSection )section.section_id, kv );
                            }
                        }
                    }
                }
예제 #4
0
                internal App( CMsgClientAppInfoResponse.App app, AppInfoStatus status )
                {
                    Status = status;
                    AppID = app.app_id;
                    ChangeNumber = app.change_number;
                    Sections = new Dictionary<EAppInfoSection, KeyValue>();

                    foreach ( var section in app.sections )
                    {
                        KeyValue kv = new KeyValue();

                        using ( MemoryStream ms = new MemoryStream( section.section_kv ) )
                            kv.ReadAsBinary( ms );

                        if ( kv.Children != null )
                        {
                            Sections.Add( ( EAppInfoSection )section.section_id, kv.Children.FirstOrDefault() ?? KeyValue.Invalid );
                        }
                    }
                }