Exemplo n.º 1
0
        /// <summary>
        /// Converts a <see cref="CS"/> to a <see cref="CS"/>
        /// </summary>
        /// <param name="cs">CS to convert</param>
        /// <returns>Converted CS`1</returns>
        /// <remarks>Is a parse function as the string must be parsed by util</remarks>
        internal static CS <T> Parse(CS <String> cs)
        {
            CS <T> retVal = new CS <T>();

            // Parse from wire format into this format
            retVal.Code = CodeValue <T> .Parse(cs.Code);

            // Copy other members
            //retVal.CodeSystem = cs.CodeSystem;
            //retVal.CodeSystemName = cs.CodeSystemName;
            //retVal.CodeSystemVersion = cs.CodeSystemVersion;
            retVal.Flavor         = cs.Flavor;
            retVal.NullFlavor     = cs.NullFlavor == null ? null : cs.NullFlavor.Clone() as CS <NullFlavor>;
            retVal.UpdateMode     = cs.UpdateMode == null ? null : cs.UpdateMode.Clone() as CS <UpdateMode>;
            retVal.ControlActRoot = cs.ControlActRoot;
            retVal.ControlActExt  = cs.ControlActExt;
            retVal.ValidTimeHigh  = cs.ValidTimeHigh;
            retVal.ValidTimeLow   = cs.ValidTimeLow;
            retVal.NullFlavor     = cs.NullFlavor;
            return(retVal);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Create a new address instance using the parts and use specified
 /// </summary>
 /// <param name="parts">The parts to create</param>
 /// <param name="use">Contextual information about the postal address</param>
 /// <example>
 ///
 /// </example>
 public AD(CS <PostalAddressUse> use, IEnumerable <ADXP> parts)
     : this(new SET <CS <PostalAddressUse> >(use, (a, b) => ((PostalAddressUse)a.Code).CompareTo(((PostalAddressUse)b.Code))), parts)
 {
 }
Exemplo n.º 3
0
 /// <summary>
 /// Gets a common ancestor
 /// </summary>
 public static NullFlavor CommonAncestorWith(this CS <NullFlavor> a, CS <NullFlavor> other)
 {
     return(NullFlavorUtil.CommonAncestorWith((NullFlavor)a, (NullFlavor)other));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Gets a common ancestor
 /// </summary>
 public static NullFlavor GetCommonParent(this CS <NullFlavor> a, CS <NullFlavor> other)
 {
     return(NullFlavorUtil.GetCommonParent((NullFlavor)a, (NullFlavor)other));
 }