public void Cleanup() { test_meiprop = null; prop_obj = null; test_meimensur = null; mensur_obj = null; }
public void Init() { test_meiprop = new Proport(); prop_obj = new Proportion(); test_meimensur = new mei.Mensur(); mensur_obj = new Model.Mensur(); }
/// <summary> /// Adds properties to a Proportion object. /// </summary> /// <param name="_propobj">Empty proportion object</param> /// <param name="_meiprop">MEI proport element</param> /// <returns>Proportion object with data</returns> public static Model.Proportion ConvertProportion(Model.Proportion _propobj, mei.Proport _meiprop) { _propobj.Sign = GetSign(_meiprop); _propobj.Affected = ConvertAffected(_meiprop); if (_meiprop.HasNum() && _meiprop.HasNumbase()) { _propobj.Num = ConverterHelper.ConvertNumNumbase(_meiprop.GetNumAttribute()); _propobj.Numbase = ConverterHelper.ConvertNumNumbase(_meiprop.GetNumbaseAttribute()); } else { throw new NullReferenceException($"<proport> doesn't have @num or @numbase!"); } return(_propobj); }
/// <summary> /// Converts value of @mse:affected into Enum Duration /// </summary> /// <param name="_prop">MEI proport element</param> /// <returns>Model.Duration</returns> private static Duration ConvertAffected(mei.Proport _prop) { return(ConverterHelper.ConvertDuration(_prop.GetAffectedAttribute())); }