public override void Deserialize(XElement element) { Id = element.GetAttributeValue("id"); BitLength = int.Parse(element.GetAttributeValue("bitLength")); foreach (var subElement in element.SubElements("Datatype")) { // TODO: var dataType = new DataType(); dataType.Deserialize(subElement); DataTypes.Add(dataType); } foreach (var subElement in element.SubElements("DatatypeRef")) { var dataTypeRef = new DataTypeRef(); dataTypeRef.Deserialize(subElement); DataTypeRefs.Add(dataTypeRef); } if (element.SubElement("Name") == null) { return; } Name = new Name(); Name.Deserialize(element.SubElement("Name")); }
private void ClassNameReadCallback(ClassName arg) { if (!DataTypes.ContainsKey(arg.InternalId)) { DataTypes.Add(arg.InternalId, arg.Name); } }
public ItemLibraryChecker() { foreach (DataType_ItemLibrary Value in Enum.GetValues(typeof(DataType_ItemLibrary))) { DataTypes.Add(new DataType(Value.ToString())); } }
public CharactorDataCheker() { foreach (DataType_Charactor Value in Enum.GetValues(typeof(DataType_Charactor))) { DataTypes.Add(new DataType(Value.ToString())); } }
private DataTypeDiffgram AddDataType(DataTypeConfiguration dataTypeConfiguration) { var datatypeDiffgram = new DataTypeDiffgram(this, dataTypeConfiguration, serviceContext); DataTypes.Add(dataTypeConfiguration.Name, datatypeDiffgram); return(datatypeDiffgram); }
public DataTypeConfigurator DataType(string name) { var dataTypeConfiguration = new DataTypeConfigurator(this, name); DataTypes.Add(name, dataTypeConfiguration); return(dataTypeConfiguration); }
public InvenrtoryDataChecker() { foreach (DataType_Inventory Value in Enum.GetValues(typeof(DataType_Inventory))) { DataTypes.Add(new DataType(Value.ToString())); } }
public void RegisterRepositoryType <R>() where R : IsRepository, new() { var repository = new R(); foreach (var type in repository.GetTypes()) { DataTypes.Add(type, typeof(R)); } RepositoryTypes.Add(typeof(R)); }
/// <summary> /// Adds the channel. /// </summary> /// <param name="channelId">The channel identifier.</param> /// <param name="mnemonic">The mnemonic.</param> /// <param name="unit">The unit.</param> /// <param name="dataType">The data type.</param> /// <param name="nullValue">The null value.</param> public void AddChannel(long channelId, string mnemonic, string unit, string dataType, string nullValue = null) { if (Mnemonics.Any(x => x.EqualsIgnoreCase(mnemonic))) { return; } ChannelIds.Add(channelId); Mnemonics.Add(mnemonic); Units.Add(unit); DataTypes.Add(dataType); NullValues.Add(nullValue); }
public void Handle(DataLoadedEvent message) { DataTypes.Clear(); var dataTypes = _subjectService.GetDataTypes(); foreach (var dataType in dataTypes) { var dt = IoC.Get <DataTypeViewModel>(); dt.Title = dataType; DataTypes.Add(dt); } }
//Формирует выпадающие списки для фильтров по параметрам public void MakeFilters() { Tasks.Clear(); Units.Clear(); CalcParamTypes.Clear(); DataTypes.Clear(); SuperProcesses.Clear(); foreach (var par in Params.Values) { var ap = par.ArchiveParam; var fp = ap.FirstParam; Tasks.Add(fp.Task ?? ""); Units.Add(ap.Units ?? ""); CalcParamTypes.Add(fp.CalcParamType.ToRussian() ?? ""); SuperProcesses.Add(ap.SuperProcess.ToRussian() ?? ""); DataTypes.Add(ap.DataType.ToRussian()); } if (Book.Forms.ContainsKey(ReporterCommand.FilterParams)) { ((FormFiltersParams)Book.Forms[ReporterCommand.FilterParams]).MakeFiltersLists(); } }
public override async Task ExecuteLoadDataTypesCommand() { IsDataTypeDisplayBusy = true; try { //then we clear the observable collection and replace it DataTypes.Clear(); var dataTypes = await UserInfo.GetPermissions().GetDataTypesAsync(true); foreach (var dataType in dataTypes) { DataTypes.Add(dataType); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsDataTypeDisplayBusy = false; } }
public void Add(string type, string description, int?table) { DataTypes.Add(type); Descriptions.Add(description); Tables.Add(table); }
/// <summary> /// Varre o documento wsdl e monta os data types especificados no mesmo /// </summary> /// <param name="xmlDoc">o documento wsdl</param> /// <param name="xmlns">XmlNamespaceManager</param> /// <returns>a lista de data types</returns> private void MountComplexType(XmlSchemaComplexType complexType) //XmlDocument xmlDoc, XmlNamespaceManager xmlns) { string typeName = ""; ArrayList parameters = new ArrayList(); bool isArray = false; HWSListType listType = null; DataType dataType = null; typeName = complexType.Name; //// tipos ainda nao suportados if (complexType.Particle == null || !typeof(XmlSchemaGroupBase).IsAssignableFrom(complexType.Particle.GetType())) { try { XmlSchemaComplexContentRestriction restriction = complexType.ContentModel.Content as XmlSchemaComplexContentRestriction; XmlSchemaAttribute att = (XmlSchemaAttribute)restriction.Attributes[0]; if (att.RefName.Name == "arrayType") { XmlSchemaAnnotated annotatedSchema = (XmlSchemaAnnotated)att; Parameter param = new Parameter(); param.Name = MakeArrayElementName(att.UnhandledAttributes[0].Value); try { param.HWSType = ConvertType(param.Name); } catch { param.HWSType = new HWSPreType(param.Name); } parameters.Add(param); listType = new HWSListType(typeName, (Parameter)parameters[0]); ListTypes.Add(listType); } } catch (Exception ex) { throw new TypeNotSupportedException(typeName); } } else { XmlSchemaGroupBase atts = (XmlSchemaGroupBase)complexType.Particle; foreach (XmlSchemaElement att in atts.Items) { Parameter param = new Parameter(); param.Name = att.Name; try { param.HWSType = ConvertType(att.SchemaTypeName.Name); } catch { param.HWSType = new HWSPreType(att.SchemaTypeName.Name); } if (att.MaxOccursString != null && att.MaxOccursString.Equals("unbounded")) { isArray = true; } parameters.Add(param); } if (isArray) { listType = new HWSListType(typeName, (Parameter)parameters[0]); ListTypes.Add(listType); } else { dataType = new DataType(typeName, parameters); DataTypes.Add(dataType); } } }