/// <summary> /// Get binary member /// </summary> /// <returns></returns> internal override MemberBinaryModelInfo GetBinaryMember(BaseOptionInfo option, Dictionary<Type, BinaryModelInfo> generatedModels) { MemberBinaryModelInfo memberBinaryModelInfo = new MemberBinaryModelInfo() { Name = Name, ResultType = BinaryModelInfo.GetBinaryModel(TypeGoInfo, option, generatedModels), CanRead = true, CanWrite = true, Type = MemberBinaryModelType.Property }; return memberBinaryModelInfo; }
/// <summary> /// Get structure of models of typeGo /// </summary> /// <param name="option"></param> /// <returns></returns> public static List <BinaryModelInfo> GetStructureModels(BaseOptionInfo option = default) { if (option == null) { option = DefaultOptions; } List <BinaryModelInfo> result = new List <BinaryModelInfo>(); Dictionary <Type, BinaryModelInfo> generatedModels = new Dictionary <Type, BinaryModelInfo>(); foreach (KeyValuePair <Type, object> type in option.Types) { Type typeGoType = ((BaseTypeGoInfo)type.Value).Type; if (typeGoType.Assembly.FullName.StartsWith("System.Private.CoreLib")) { continue; } result.Add(BinaryModelInfo.GetBinaryModel(typeGoType, option, generatedModels)); } return(result); }