Exemple #1
0
            public ErrorReport Deserialize(global::Omnix.Serialization.RocketPack.RocketPackReader r, int rank)
            {
                if (rank > 256)
                {
                    throw new global::System.FormatException();
                }

                uint propertyCount = r.GetUInt32();

                global::Omnix.Serialization.RocketPack.Timestamp p_creationTime = global::Omnix.Serialization.RocketPack.Timestamp.Zero;
                ErrorReportType p_type = (ErrorReportType)0;

                for (; propertyCount > 0; propertyCount--)
                {
                    uint id = r.GetUInt32();
                    switch (id)
                    {
                    case 0:
                    {
                        p_creationTime = r.GetTimestamp();
                        break;
                    }

                    case 1:
                    {
                        p_type = (ErrorReportType)r.GetUInt64();
                        break;
                    }
                    }
                }

                return(new ErrorReport(p_creationTime, p_type));
            }
Exemple #2
0
            public ClusterMetadata Deserialize(global::Omnix.Serialization.RocketPack.RocketPackReader r, int rank)
            {
                if (rank > 256)
                {
                    throw new global::System.FormatException();
                }

                uint propertyCount = r.GetUInt32();

                ulong[] p_sectors = global::System.Array.Empty <ulong>();
                uint    p_length  = 0;

                global::Omnix.Serialization.RocketPack.Timestamp p_lastAccessTime = global::Omnix.Serialization.RocketPack.Timestamp.Zero;

                for (; propertyCount > 0; propertyCount--)
                {
                    uint id = r.GetUInt32();
                    switch (id)
                    {
                    case 0:
                    {
                        var length = r.GetUInt32();
                        p_sectors = new ulong[length];
                        for (int i = 0; i < p_sectors.Length; i++)
                        {
                            p_sectors[i] = r.GetUInt64();
                        }
                        break;
                    }

                    case 1:
                    {
                        p_length = r.GetUInt32();
                        break;
                    }

                    case 2:
                    {
                        p_lastAccessTime = r.GetTimestamp();
                        break;
                    }
                    }
                }

                return(new ClusterMetadata(p_sectors, p_length, p_lastAccessTime));
            }