예제 #1
0
 private static object GetValue(FieldProto fdp, UnknownField unknownField)
 {
     if (unknownField.VarintList.Count > 0)
     {
         return(unknownField.VarintList[0]);
     }
     if (unknownField.Fixed32List.Count > 0)
     {
         if (fdp.Type == Type.TYPE_FLOAT)
         {
             return(BitConverter.ToSingle(BitConverter.GetBytes(unknownField.Fixed32List[0]), 0));
         }
         return(unknownField.Fixed32List[0]);
     }
     throw new Exception();
 }
예제 #2
0
파일: Program.cs 프로젝트: Geracl/d3proto
 private static string GetTypeName(FieldProto ext)
 {
     return ext.HasTypeName ? ext.TypeName : Types[ext.Type];
 }
예제 #3
0
 private static string GetTypeName(FieldProto ext)
 {
     return(ext.HasTypeName ? ext.TypeName : Types[ext.Type]);
 }
예제 #4
0
파일: Program.cs 프로젝트: Geracl/d3proto
 private static object GetValue(FieldProto fdp, UnknownField unknownField)
 {
     if (unknownField.VarintList.Count > 0) return unknownField.VarintList[0];
     if (unknownField.Fixed32List.Count > 0)
     {
         if (fdp.Type == Type.TYPE_FLOAT)
             return BitConverter.ToSingle(BitConverter.GetBytes(unknownField.Fixed32List[0]), 0);
         return unknownField.Fixed32List[0];
     }
     throw new Exception();
 }