コード例 #1
0
ファイル: Program.cs プロジェクト: oneminot/everest
        static void flc_MessageAvailable(object sender, MARC.Everest.Connectors.UnsolicitedDataEventArgs e)
        {
            // Get a local copy of the connector that raised the event
            var listenConnector = sender as FileListenConnector;
            // Receive the message from the listen connector's stack
            var receiveResult = listenConnector.Receive();

            // If the result was processed successfully, then show it
            if (receiveResult.Structure != null)
            {
                // Received structure should be cast as a clinical document for convenience
                var cda = receiveResult.Structure as ClinicalDocument;

                // Output the title of the CDA
                Console.WriteLine("Got a CDA titled : {0}", cda.Title);

                // If the CDA has a structured body then show the sub-sections
                if (cda.Component != null && cda.Component.BodyChoice is StructuredBody)
                    foreach (var comp in (cda.Component.BodyChoice as StructuredBody).Component)
                        Console.WriteLine("\tSubSection {0}", comp.Section.Title);
            }

            Console.WriteLine("The following issues were detected:");
            foreach (var dtl in receiveResult.Details)
                Console.WriteLine("{0} @ {1}", dtl.Type, dtl.Message);
        }
コード例 #2
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual MARC.Everest.Connectors.ResultCode Graph(System.Xml.XmlWriter s, object o, MARC.Everest.Interfaces.IGraphable context, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterGraphResult resultContext) {
			MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Agent instance = o as MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Agent;;
			MARC.Everest.Connectors.ResultCode retVal = MARC.Everest.Connectors.ResultCode.Accepted;
			if(o == null) throw new System.ArgumentNullException("o");
			if(instance == null) throw new System.ArgumentException(System.String.Format("Could not cast type '{0}' to 'MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Agent'!", o.GetType().FullName));
			bool isInstanceNull = instance.NullFlavor != null;
			if(instance.NullFlavor != null) this.Host.WriteNullFlavorUtil(s, instance.NullFlavor);
if(instance.ClassCode != null && !isInstanceNull) {

			s.WriteAttributeString("classCode", MARC.Everest.Connectors.Util.ToWireFormat(instance.ClassCode));
}
if(instance.RealmCode != null && !isInstanceNull) {

if(!instance.RealmCode.IsEmpty)
			retVal = Host.WriteElementUtil(s, "realmCode", (MARC.Everest.Interfaces.IGraphable)instance.RealmCode, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TypeId != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "typeId", (MARC.Everest.Interfaces.IGraphable)instance.TypeId, typeof(MARC.Everest.DataTypes.II), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TemplateId != null && !isInstanceNull) {

if(!instance.TemplateId.IsEmpty)
			retVal = Host.WriteElementUtil(s, "templateId", (MARC.Everest.Interfaces.IGraphable)instance.TemplateId, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.RepresentedOrganization != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "representedOrganization", (MARC.Everest.Interfaces.IGraphable)instance.RepresentedOrganization, typeof(MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Organization), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
			return retVal;
		}
コード例 #3
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual object Parse(System.Xml.XmlReader s, System.Type useType, System.Type currentInteractionType, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterParseResult resultContext) {
			System.String nil = s.GetAttribute("nil", MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(!System.String.IsNullOrEmpty(nil) && System.Convert.ToBoolean(nil)) return null;;
			MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Agent instance = new MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Agent();;
			if(s.NodeType != System.Xml.XmlNodeType.Element) throw new System.InvalidOperationException(System.String.Format("Expected node type of Element, actual node type is '{0}'", s.NodeType));
if(s.GetAttribute("classCode") != null){ if(!"AGNT".Equals(s.GetAttribute("classCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("classCode"), "AGNT", false, s.ToString()));  instance.ClassCode = (MARC.Everest.DataTypes.CS<System.String>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("classCode"), typeof(MARC.Everest.DataTypes.CS<System.String>)); }
			if(s.GetAttribute("nullFlavor") != null) instance.NullFlavor = (MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("nullFlavor"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>));
			if(s.IsEmptyElement) return instance;
string sName = s.Name;
int sDepth = s.Depth;
s.Read();
while(!(s.NodeType == System.Xml.XmlNodeType.EndElement && s.Name == sName && s.Depth == sDepth)) {
string oldName = s.LocalName; 
 try { if(s.NodeType == System.Xml.XmlNodeType.Element) { 
 if(s.LocalName == "representedOrganization" ) {

			object db1b9febfa2ff4d9c8a44c75c7799f8e1 = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Organization), currentInteractionType, resultContext); instance.RepresentedOrganization = db1b9febfa2ff4d9c8a44c75c7799f8e1 is MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Organization ? db1b9febfa2ff4d9c8a44c75c7799f8e1 as MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Organization : (MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Organization)MARC.Everest.Connectors.Util.FromWireFormat(db1b9febfa2ff4d9c8a44c75c7799f8e1, typeof(MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Organization));
}
else if(s.LocalName == "realmCode" ) {

			object d8a6a02dee5514777bfbbd1f6d49916f3 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), currentInteractionType, resultContext); instance.RealmCode = d8a6a02dee5514777bfbbd1f6d49916f3 is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> ? d8a6a02dee5514777bfbbd1f6d49916f3 as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>)MARC.Everest.Connectors.Util.FromWireFormat(d8a6a02dee5514777bfbbd1f6d49916f3, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>));
}
else if(s.LocalName == "typeId" ) {

			object d1e93adf2ef0647dea657168fb827351e = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.II), currentInteractionType, resultContext); instance.TypeId = d1e93adf2ef0647dea657168fb827351e is MARC.Everest.DataTypes.II ? d1e93adf2ef0647dea657168fb827351e as MARC.Everest.DataTypes.II : (MARC.Everest.DataTypes.II)MARC.Everest.Connectors.Util.FromWireFormat(d1e93adf2ef0647dea657168fb827351e, typeof(MARC.Everest.DataTypes.II));
}
else if(s.LocalName == "templateId" ) {

			object d6fcedf8ad81741bfb6425f42cbe2daf7 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.TemplateId = d6fcedf8ad81741bfb6425f42cbe2daf7 is MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> ? d6fcedf8ad81741bfb6425f42cbe2daf7 as MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(d6fcedf8ad81741bfb6425f42cbe2daf7, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>));
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotImplementedElementResultDetail(MARC.Everest.Connectors.ResultDetailType.Warning, s.LocalName, s.NamespaceURI, s.ToString(), null)); }
}
}
catch (System.Exception e) { resultContext.AddResultDetail(new MARC.Everest.Connectors.ResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, e.Message, s.ToString(), e)); }
finally { if(oldName.Equals(s.LocalName)) s.Read(); } }
			return instance;
		}
コード例 #4
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual object Parse(System.Xml.XmlReader s, System.Type useType, System.Type currentInteractionType, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterParseResult resultContext) {
			System.String nil = s.GetAttribute("nil", MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(!System.String.IsNullOrEmpty(nil) && System.Convert.ToBoolean(nil)) return null;;
			MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.InformationProvision instance = new MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.InformationProvision();;
			if(s.NodeType != System.Xml.XmlNodeType.Element) throw new System.InvalidOperationException(System.String.Format("Expected node type of Element, actual node type is '{0}'", s.NodeType));
if(s.GetAttribute("classCode") != null){ if(!"INFRM".Equals(s.GetAttribute("classCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("classCode"), "INFRM", false, s.ToString()));  instance.ClassCode = (MARC.Everest.DataTypes.CS<System.String>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("classCode"), typeof(MARC.Everest.DataTypes.CS<System.String>)); }
if(s.GetAttribute("moodCode") != null){ if(!"EVN".Equals(s.GetAttribute("moodCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("moodCode"), "EVN", false, s.ToString()));  instance.MoodCode = (MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ActMood>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("moodCode"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ActMood>)); }
			if(s.GetAttribute("nullFlavor") != null) instance.NullFlavor = (MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("nullFlavor"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>));
			if(s.IsEmptyElement) return instance;
string sName = s.Name;
int sDepth = s.Depth;
s.Read();
while(!(s.NodeType == System.Xml.XmlNodeType.EndElement && s.Name == sName && s.Depth == sDepth)) {
string oldName = s.LocalName; 
 try { if(s.NodeType == System.Xml.XmlNodeType.Element) { 
 if(s.LocalName == "performer" ) {

			object d8e34f6bfeb6a4d43a6a72e6685b1ae59 = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Performer), currentInteractionType, resultContext); instance.Performer = d8e34f6bfeb6a4d43a6a72e6685b1ae59 is MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Performer ? d8e34f6bfeb6a4d43a6a72e6685b1ae59 as MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Performer : (MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Performer)MARC.Everest.Connectors.Util.FromWireFormat(d8e34f6bfeb6a4d43a6a72e6685b1ae59, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Performer));
}
else if(s.LocalName == "realmCode" ) {

			object dc72469066497488c8d87b7a3d482e0f4 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), currentInteractionType, resultContext); instance.RealmCode = dc72469066497488c8d87b7a3d482e0f4 is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> ? dc72469066497488c8d87b7a3d482e0f4 as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>)MARC.Everest.Connectors.Util.FromWireFormat(dc72469066497488c8d87b7a3d482e0f4, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>));
}
else if(s.LocalName == "typeId" ) {

			object dab036d9b427c480cae5adad26cecf4ef = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.II), currentInteractionType, resultContext); instance.TypeId = dab036d9b427c480cae5adad26cecf4ef is MARC.Everest.DataTypes.II ? dab036d9b427c480cae5adad26cecf4ef as MARC.Everest.DataTypes.II : (MARC.Everest.DataTypes.II)MARC.Everest.Connectors.Util.FromWireFormat(dab036d9b427c480cae5adad26cecf4ef, typeof(MARC.Everest.DataTypes.II));
}
else if(s.LocalName == "templateId" ) {

			object d4a76838aae0f45f5b6d0c9eec1c8ebf6 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.TemplateId = d4a76838aae0f45f5b6d0c9eec1c8ebf6 is MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> ? d4a76838aae0f45f5b6d0c9eec1c8ebf6 as MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(d4a76838aae0f45f5b6d0c9eec1c8ebf6, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>));
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotImplementedElementResultDetail(MARC.Everest.Connectors.ResultDetailType.Warning, s.LocalName, s.NamespaceURI, s.ToString(), null)); }
}
}
catch (System.Exception e) { resultContext.AddResultDetail(new MARC.Everest.Connectors.ResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, e.Message, s.ToString(), e)); }
finally { if(oldName.Equals(s.LocalName)) s.Read(); } }
			return instance;
		}
コード例 #5
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual object Parse(System.Xml.XmlReader s, System.Type useType, System.Type currentInteractionType, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterParseResult resultContext) {
			System.String nil = s.GetAttribute("nil", MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(!System.String.IsNullOrEmpty(nil) && System.Convert.ToBoolean(nil)) return null;;
			MARC.Everest.RMIM.UV.NE2008.COCT_MT150002UV01.Organization instance = new MARC.Everest.RMIM.UV.NE2008.COCT_MT150002UV01.Organization();;
			if(s.NodeType != System.Xml.XmlNodeType.Element) throw new System.InvalidOperationException(System.String.Format("Expected node type of Element, actual node type is '{0}'", s.NodeType));
if(s.GetAttribute("classCode") != null){ if(!"ORG".Equals(s.GetAttribute("classCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("classCode"), "ORG", false, s.ToString()));  instance.ClassCode = (MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.EntityClass>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("classCode"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.EntityClass>)); }
if(s.GetAttribute("determinerCode") != null){ if(!"INSTANCE".Equals(s.GetAttribute("determinerCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("determinerCode"), "INSTANCE", false, s.ToString()));  instance.DeterminerCode = (MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.EntityDeterminer>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("determinerCode"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.EntityDeterminer>)); }
			if(s.GetAttribute("nullFlavor") != null) instance.NullFlavor = (MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("nullFlavor"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>));
			if(s.IsEmptyElement) return instance;
string sName = s.Name;
int sDepth = s.Depth;
s.Read();
while(!(s.NodeType == System.Xml.XmlNodeType.EndElement && s.Name == sName && s.Depth == sDepth)) {
string oldName = s.LocalName; 
 try { if(s.NodeType == System.Xml.XmlNodeType.Element) { 
 if(s.LocalName == "id" ) {

			object da36086fff0af4749a8c6752e7f6a15eb = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.Id = da36086fff0af4749a8c6752e7f6a15eb is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II> ? da36086fff0af4749a8c6752e7f6a15eb as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(da36086fff0af4749a8c6752e7f6a15eb, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>));
}
else if(s.LocalName == "code" ) {

			object d16b3592efbff42fba776326801751a3a = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.CE<System.String>), currentInteractionType, resultContext); instance.Code = d16b3592efbff42fba776326801751a3a is MARC.Everest.DataTypes.CE<System.String> ? d16b3592efbff42fba776326801751a3a as MARC.Everest.DataTypes.CE<System.String> : (MARC.Everest.DataTypes.CE<System.String>)MARC.Everest.Connectors.Util.FromWireFormat(d16b3592efbff42fba776326801751a3a, typeof(MARC.Everest.DataTypes.CE<System.String>));
}
else if(s.LocalName == "name" ) {

			object d2dbe7c8cdc0542f483f1e147dfe4ef61 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.ON>), currentInteractionType, resultContext); instance.Name = d2dbe7c8cdc0542f483f1e147dfe4ef61 is MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.ON> ? d2dbe7c8cdc0542f483f1e147dfe4ef61 as MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.ON> : (MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.ON>)MARC.Everest.Connectors.Util.FromWireFormat(d2dbe7c8cdc0542f483f1e147dfe4ef61, typeof(MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.ON>));
}
else if(s.LocalName == "addr" ) {

			object d64ec920b4bf547c497f4a23dc4ceaacc = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.AD>), currentInteractionType, resultContext); instance.Addr = d64ec920b4bf547c497f4a23dc4ceaacc is MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.AD> ? d64ec920b4bf547c497f4a23dc4ceaacc as MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.AD> : (MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.AD>)MARC.Everest.Connectors.Util.FromWireFormat(d64ec920b4bf547c497f4a23dc4ceaacc, typeof(MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.AD>));
}
else if(s.LocalName == "realmCode" ) {

			object d44228ab5b9824fe6b69933f7440e1b3e = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), currentInteractionType, resultContext); instance.RealmCode = d44228ab5b9824fe6b69933f7440e1b3e is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> ? d44228ab5b9824fe6b69933f7440e1b3e as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>)MARC.Everest.Connectors.Util.FromWireFormat(d44228ab5b9824fe6b69933f7440e1b3e, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>));
}
else if(s.LocalName == "typeId" ) {

			object dafba14a801f44a31b74885b20a750aec = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.II), currentInteractionType, resultContext); instance.TypeId = dafba14a801f44a31b74885b20a750aec is MARC.Everest.DataTypes.II ? dafba14a801f44a31b74885b20a750aec as MARC.Everest.DataTypes.II : (MARC.Everest.DataTypes.II)MARC.Everest.Connectors.Util.FromWireFormat(dafba14a801f44a31b74885b20a750aec, typeof(MARC.Everest.DataTypes.II));
}
else if(s.LocalName == "templateId" ) {

			object d2fd740b2d1d74c25811ca1d18d7aa5af = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.TemplateId = d2fd740b2d1d74c25811ca1d18d7aa5af is MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> ? d2fd740b2d1d74c25811ca1d18d7aa5af as MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(d2fd740b2d1d74c25811ca1d18d7aa5af, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>));
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotImplementedElementResultDetail(MARC.Everest.Connectors.ResultDetailType.Warning, s.LocalName, s.NamespaceURI, s.ToString(), null)); }
}
}
catch (System.Exception e) { resultContext.AddResultDetail(new MARC.Everest.Connectors.ResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, e.Message, s.ToString(), e)); }
finally { if(oldName.Equals(s.LocalName)) s.Read(); } }
			return instance;
		}
コード例 #6
0
        public IAsyncResult BeginSend(MARC.Everest.Interfaces.IGraphable data, IReceiveResult correlate, AsyncCallback callback, object state)
        {
            // Formatter check
            if (!IsOpen())
                throw new ConnectorException(ConnectorException.MSG_INVALID_STATE, ConnectorException.ReasonType.NotOpen);

            // Setup wroker
            Worker w = new Worker();

            // Create a new instance of the formatter
            w.Formatter = (IXmlStructureFormatter)Formatter;
            var cresult = correlate as WcfReceiveResult;
            w.MessageId = (correlate as WcfReceiveResult).MessageIdentifier;
            w.MessageVersion = (correlate as WcfReceiveResult).MessageVersion;
            w.InvalidResponse = InvalidResponse;
            w.ResponseHeaders = cresult.ResponseHeaders;

            // Set async result
            IAsyncResult Result = new SendResultAsyncResult(state, new AutoResetEvent(false));

            // Completed delegate
            w.Completed += delegate(object Sender)
            {
                Worker sWorker = Sender as Worker; // Strong type sender
                // Lookup the result in the dictionary
                if (!asyncResults.ContainsKey(Result))
                    lock (asyncResults) { asyncResults.Add(Result, sWorker.SendResult); }
                (Result as SendResultAsyncResult).SetComplete(); // Set completed
                (Result.AsyncWaitHandle as AutoResetEvent).Set(); // send signal
                if (callback != null) callback(Result); // callback
            };

            // Add to thread pool
            ThreadPool.QueueUserWorkItem(new WaitCallback(w.WorkSend), data);

            return Result;
        }
コード例 #7
0
ファイル: MemoryConnector.cs プロジェクト: oneminot/everest
    /// <summary>
    /// Synchronous send operation
    /// </summary>
    /// <param name="data">The data to send</param>
    /// <returns>The result of the send operation</returns>
    public ISendResult Send(MARC.Everest.Interfaces.IGraphable data)
    {
        // Good practice to check if the connector is open
        if (!IsOpen())
            throw new ConnectorException(ConnectorException.MSG_INVALID_STATE, ConnectorException.ReasonType.NotOpen, null);

        // Create a new worker
        Worker w = new Worker();

        // Always clone the current formatter
        w.Formatter = (IStructureFormatter)Formatter.Clone();

        // Perform the work
        w.Work(data);

        return w.Result;

    }
コード例 #8
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual MARC.Everest.Connectors.ResultCode Graph(System.Xml.XmlWriter s, object o, MARC.Everest.Interfaces.IGraphable context, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterGraphResult resultContext) {
			MARC.Everest.RMIM.UV.NE2008.COCT_MT040008UV.Responsible instance = o as MARC.Everest.RMIM.UV.NE2008.COCT_MT040008UV.Responsible;;
			MARC.Everest.Connectors.ResultCode retVal = MARC.Everest.Connectors.ResultCode.Accepted;
			if(o == null) throw new System.ArgumentNullException("o");
			if(instance == null) throw new System.ArgumentException(System.String.Format("Could not cast type '{0}' to 'MARC.Everest.RMIM.UV.NE2008.COCT_MT040008UV.Responsible'!", o.GetType().FullName));
			bool isInstanceNull = instance.NullFlavor != null;
			bool isEntryPoint = s is MARC.Everest.Xml.XmlStateWriter && (s as MARC.Everest.Xml.XmlStateWriter).ElementStack.Count == 0 || s.WriteState == System.Xml.WriteState.Start; if(isEntryPoint) s.WriteStartElement("Responsible", "urn:hl7-org:v3");
			if(isEntryPoint) s.WriteAttributeString("xmlns", "xsi", null, MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(instance.NullFlavor != null) this.Host.WriteNullFlavorUtil(s, instance.NullFlavor);
if(instance.ClassCode != null && !isInstanceNull) {

			s.WriteAttributeString("classCode", MARC.Everest.Connectors.Util.ToWireFormat(instance.ClassCode));
}
if(instance.RealmCode != null && !isInstanceNull) {

if(!instance.RealmCode.IsEmpty)
			retVal = Host.WriteElementUtil(s, "realmCode", (MARC.Everest.Interfaces.IGraphable)instance.RealmCode, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TypeId != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "typeId", (MARC.Everest.Interfaces.IGraphable)instance.TypeId, typeof(MARC.Everest.DataTypes.II), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TemplateId != null && !isInstanceNull) {

if(!instance.TemplateId.IsEmpty)
			retVal = Host.WriteElementUtil(s, "templateId", (MARC.Everest.Interfaces.IGraphable)instance.TemplateId, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Id != null && !isInstanceNull) {

if(!instance.Id.IsEmpty)
			retVal = Host.WriteElementUtil(s, "id", (MARC.Everest.Interfaces.IGraphable)instance.Id, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Code != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "code", (MARC.Everest.Interfaces.IGraphable)instance.Code, typeof(MARC.Everest.DataTypes.CE<System.String>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.EffectiveTime != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "effectiveTime", (MARC.Everest.Interfaces.IGraphable)instance.EffectiveTime, typeof(MARC.Everest.DataTypes.IVL<MARC.Everest.DataTypes.TS>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.AgentEntityChoicePlayer != null && !isInstanceNull) {

 if(instance.AgentEntityChoicePlayer.GetType() == typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT150007UV.Organization)) {

			retVal = Host.WriteElementUtil(s, "agentOrganization", (MARC.Everest.Interfaces.IGraphable)instance.AgentEntityChoicePlayer, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT150007UV.Organization), context, resultContext);
}
else if(instance.AgentEntityChoicePlayer.GetType() == typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT030207UV.Person)) {

			retVal = Host.WriteElementUtil(s, "agentPerson", (MARC.Everest.Interfaces.IGraphable)instance.AgentEntityChoicePlayer, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT030207UV.Person), context, resultContext);
}
else if(instance.AgentEntityChoicePlayer.GetType() == typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT140007UV.Device)) {

			retVal = Host.WriteElementUtil(s, "agentDevice", (MARC.Everest.Interfaces.IGraphable)instance.AgentEntityChoicePlayer, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT140007UV.Device), context, resultContext);
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotSupportedChoiceResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, System.String.Format("Type {0} is not a valid choice according to available choice elements", instance.AgentEntityChoicePlayer.GetType()), s.ToString(), null)); }
}
if(instance.RepresentedEntityChoiceScoper != null && !isInstanceNull) {

 if(instance.RepresentedEntityChoiceScoper.GetType() == typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT150007UV.Organization)) {

			retVal = Host.WriteElementUtil(s, "representedOrganization", (MARC.Everest.Interfaces.IGraphable)instance.RepresentedEntityChoiceScoper, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT150007UV.Organization), context, resultContext);
}
else if(instance.RepresentedEntityChoiceScoper.GetType() == typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT030207UV.Person)) {

			retVal = Host.WriteElementUtil(s, "representedPerson", (MARC.Everest.Interfaces.IGraphable)instance.RepresentedEntityChoiceScoper, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT030207UV.Person), context, resultContext);
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotSupportedChoiceResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, System.String.Format("Type {0} is not a valid choice according to available choice elements", instance.RepresentedEntityChoiceScoper.GetType()), s.ToString(), null)); }
}
			if(isEntryPoint) s.WriteEndElement();
			return retVal;
		}
コード例 #9
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual object Parse(System.Xml.XmlReader s, System.Type useType, System.Type currentInteractionType, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterParseResult resultContext) {
			System.String nil = s.GetAttribute("nil", MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(!System.String.IsNullOrEmpty(nil) && System.Convert.ToBoolean(nil)) return null;;
			MARC.Everest.RMIM.UV.NE2008.COCT_MT510000UV06.PersonalRelationship instance = new MARC.Everest.RMIM.UV.NE2008.COCT_MT510000UV06.PersonalRelationship();;
			if(s.NodeType != System.Xml.XmlNodeType.Element) throw new System.InvalidOperationException(System.String.Format("Expected node type of Element, actual node type is '{0}'", s.NodeType));
if(s.GetAttribute("classCode") != null){ if(!"PRS".Equals(s.GetAttribute("classCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("classCode"), "PRS", false, s.ToString()));  instance.ClassCode = (MARC.Everest.DataTypes.CS<System.String>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("classCode"), typeof(MARC.Everest.DataTypes.CS<System.String>)); }
			if(s.GetAttribute("nullFlavor") != null) instance.NullFlavor = (MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("nullFlavor"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>));
			if(s.IsEmptyElement) return instance;
string sName = s.Name;
int sDepth = s.Depth;
s.Read();
while(!(s.NodeType == System.Xml.XmlNodeType.EndElement && s.Name == sName && s.Depth == sDepth)) {
string oldName = s.LocalName; 
 try { if(s.NodeType == System.Xml.XmlNodeType.Element) { 
 if(s.LocalName == "id" ) {

			object d8d8539ee5344492081a6a0d859c388ad = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.Id = d8d8539ee5344492081a6a0d859c388ad is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II> ? d8d8539ee5344492081a6a0d859c388ad as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(d8d8539ee5344492081a6a0d859c388ad, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>));
}
else if(s.LocalName == "code" ) {

			object dd67367774f3941acbf7dfca1b2a69164 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.CE<System.String>), currentInteractionType, resultContext); instance.Code = dd67367774f3941acbf7dfca1b2a69164 is MARC.Everest.DataTypes.CE<System.String> ? dd67367774f3941acbf7dfca1b2a69164 as MARC.Everest.DataTypes.CE<System.String> : (MARC.Everest.DataTypes.CE<System.String>)MARC.Everest.Connectors.Util.FromWireFormat(dd67367774f3941acbf7dfca1b2a69164, typeof(MARC.Everest.DataTypes.CE<System.String>));
}
else if(s.LocalName == "relationshipHolder" ) {

			object d03f6d05036c647b984272e9d5a2351ce = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.Person), currentInteractionType, resultContext); instance.RelationshipHolder = d03f6d05036c647b984272e9d5a2351ce is MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.Person ? d03f6d05036c647b984272e9d5a2351ce as MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.Person : (MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.Person)MARC.Everest.Connectors.Util.FromWireFormat(d03f6d05036c647b984272e9d5a2351ce, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.Person));
}
else if(s.LocalName == "personalRelationshipWith" ) {

			object d771dcd7ccdf84e628d037441337ca57d = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.Person), currentInteractionType, resultContext); instance.PersonalRelationshipWith = d771dcd7ccdf84e628d037441337ca57d is MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.Person ? d771dcd7ccdf84e628d037441337ca57d as MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.Person : (MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.Person)MARC.Everest.Connectors.Util.FromWireFormat(d771dcd7ccdf84e628d037441337ca57d, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.Person));
}
else if(s.LocalName == "realmCode" ) {

			object d2c1e9f65f02942ed9f3f0d0c70ee6c31 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), currentInteractionType, resultContext); instance.RealmCode = d2c1e9f65f02942ed9f3f0d0c70ee6c31 is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> ? d2c1e9f65f02942ed9f3f0d0c70ee6c31 as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>)MARC.Everest.Connectors.Util.FromWireFormat(d2c1e9f65f02942ed9f3f0d0c70ee6c31, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>));
}
else if(s.LocalName == "typeId" ) {

			object df2d0b5e10945459691e14d229907275f = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.II), currentInteractionType, resultContext); instance.TypeId = df2d0b5e10945459691e14d229907275f is MARC.Everest.DataTypes.II ? df2d0b5e10945459691e14d229907275f as MARC.Everest.DataTypes.II : (MARC.Everest.DataTypes.II)MARC.Everest.Connectors.Util.FromWireFormat(df2d0b5e10945459691e14d229907275f, typeof(MARC.Everest.DataTypes.II));
}
else if(s.LocalName == "templateId" ) {

			object df2aa4ab5723640c0a4213c97c01bdbd4 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.TemplateId = df2aa4ab5723640c0a4213c97c01bdbd4 is MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> ? df2aa4ab5723640c0a4213c97c01bdbd4 as MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(df2aa4ab5723640c0a4213c97c01bdbd4, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>));
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotImplementedElementResultDetail(MARC.Everest.Connectors.ResultDetailType.Warning, s.LocalName, s.NamespaceURI, s.ToString(), null)); }
}
}
catch (System.Exception e) { resultContext.AddResultDetail(new MARC.Everest.Connectors.ResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, e.Message, s.ToString(), e)); }
finally { if(oldName.Equals(s.LocalName)) s.Read(); } }
			return instance;
		}
コード例 #10
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual object Parse(System.Xml.XmlReader s, System.Type useType, System.Type currentInteractionType, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterParseResult resultContext) {
			System.String nil = s.GetAttribute("nil", MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(!System.String.IsNullOrEmpty(nil) && System.Convert.ToBoolean(nil)) return null;;
			MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.IndirectAuthorithyOver instance = new MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.IndirectAuthorithyOver();;
			if(s.NodeType != System.Xml.XmlNodeType.Element) throw new System.InvalidOperationException(System.String.Format("Expected node type of Element, actual node type is '{0}'", s.NodeType));
if(s.GetAttribute("typeCode") != null){ if(!"INDAUTH".Equals(s.GetAttribute("typeCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("typeCode"), "INDAUTH", false, s.ToString()));  instance.TypeCode = (MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.RoleLinkType>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("typeCode"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.RoleLinkType>)); }
			if(s.GetAttribute("nullFlavor") != null) instance.NullFlavor = (MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("nullFlavor"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>));
			if(s.IsEmptyElement) return instance;
string sName = s.Name;
int sDepth = s.Depth;
s.Read();
while(!(s.NodeType == System.Xml.XmlNodeType.EndElement && s.Name == sName && s.Depth == sDepth)) {
string oldName = s.LocalName; 
 try { if(s.NodeType == System.Xml.XmlNodeType.Element) { 
 if(s.LocalName == "responsibleParty" ) {

			object d370a739fb31e4e88b6e9681214a9ffef = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.ResponsibleParty), currentInteractionType, resultContext); instance.ResponsibleParty = d370a739fb31e4e88b6e9681214a9ffef is MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.ResponsibleParty ? d370a739fb31e4e88b6e9681214a9ffef as MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.ResponsibleParty : (MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.ResponsibleParty)MARC.Everest.Connectors.Util.FromWireFormat(d370a739fb31e4e88b6e9681214a9ffef, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.ResponsibleParty));
}
else if(s.LocalName == "realmCode" ) {

			object dffd43f9747ab4a12aff45fc4b6f701db = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), currentInteractionType, resultContext); instance.RealmCode = dffd43f9747ab4a12aff45fc4b6f701db is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> ? dffd43f9747ab4a12aff45fc4b6f701db as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>)MARC.Everest.Connectors.Util.FromWireFormat(dffd43f9747ab4a12aff45fc4b6f701db, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>));
}
else if(s.LocalName == "typeId" ) {

			object dd826ede0f5cc4f1ea8cb78deaceba091 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.II), currentInteractionType, resultContext); instance.TypeId = dd826ede0f5cc4f1ea8cb78deaceba091 is MARC.Everest.DataTypes.II ? dd826ede0f5cc4f1ea8cb78deaceba091 as MARC.Everest.DataTypes.II : (MARC.Everest.DataTypes.II)MARC.Everest.Connectors.Util.FromWireFormat(dd826ede0f5cc4f1ea8cb78deaceba091, typeof(MARC.Everest.DataTypes.II));
}
else if(s.LocalName == "templateId" ) {

			object de979602699ee4e51aafad36505af0dac = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.TemplateId = de979602699ee4e51aafad36505af0dac is MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> ? de979602699ee4e51aafad36505af0dac as MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(de979602699ee4e51aafad36505af0dac, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>));
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotImplementedElementResultDetail(MARC.Everest.Connectors.ResultDetailType.Warning, s.LocalName, s.NamespaceURI, s.ToString(), null)); }
}
}
catch (System.Exception e) { resultContext.AddResultDetail(new MARC.Everest.Connectors.ResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, e.Message, s.ToString(), e)); }
finally { if(oldName.Equals(s.LocalName)) s.Read(); } }
			return instance;
		}
コード例 #11
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual object Parse(System.Xml.XmlReader s, System.Type useType, System.Type currentInteractionType, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterParseResult resultContext) {
			System.String nil = s.GetAttribute("nil", MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(!System.String.IsNullOrEmpty(nil) && System.Convert.ToBoolean(nil)) return null;;
			MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Verification instance = new MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Verification();;
			if(s.NodeType != System.Xml.XmlNodeType.Element) throw new System.InvalidOperationException(System.String.Format("Expected node type of Element, actual node type is '{0}'", s.NodeType));
if(s.GetAttribute("classCode") != null){ if(!"OBS".Equals(s.GetAttribute("classCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("classCode"), "OBS", false, s.ToString()));  instance.ClassCode = (MARC.Everest.DataTypes.CS<System.String>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("classCode"), typeof(MARC.Everest.DataTypes.CS<System.String>)); }
if(s.GetAttribute("moodCode") != null){ if(!"EVN".Equals(s.GetAttribute("moodCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("moodCode"), "EVN", false, s.ToString()));  instance.MoodCode = (MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ActMood>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("moodCode"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ActMood>)); }
			if(s.GetAttribute("nullFlavor") != null) instance.NullFlavor = (MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("nullFlavor"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>));
			if(s.IsEmptyElement) return instance;
string sName = s.Name;
int sDepth = s.Depth;
s.Read();
while(!(s.NodeType == System.Xml.XmlNodeType.EndElement && s.Name == sName && s.Depth == sDepth)) {
string oldName = s.LocalName; 
 try { if(s.NodeType == System.Xml.XmlNodeType.Element) { 
 if(s.LocalName == "id" ) {

			object dfe6c8ab3d89545fd882f98e8156de713 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.Id = dfe6c8ab3d89545fd882f98e8156de713 is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II> ? dfe6c8ab3d89545fd882f98e8156de713 as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(dfe6c8ab3d89545fd882f98e8156de713, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>));
}
else if(s.LocalName == "code" ) {

			object d2b0169f800d441cbae19e0ef6b5acb15 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.CD<System.String>), currentInteractionType, resultContext); instance.Code = d2b0169f800d441cbae19e0ef6b5acb15 is MARC.Everest.DataTypes.CD<System.String> ? d2b0169f800d441cbae19e0ef6b5acb15 as MARC.Everest.DataTypes.CD<System.String> : (MARC.Everest.DataTypes.CD<System.String>)MARC.Everest.Connectors.Util.FromWireFormat(d2b0169f800d441cbae19e0ef6b5acb15, typeof(MARC.Everest.DataTypes.CD<System.String>));
}
else if(s.LocalName == "statusCode" ) {

			object d7469b81f11ad4c5280ee14eee319f03c = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ActStatus>), currentInteractionType, resultContext); instance.StatusCode = d7469b81f11ad4c5280ee14eee319f03c is MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ActStatus> ? d7469b81f11ad4c5280ee14eee319f03c as MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ActStatus> : (MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ActStatus>)MARC.Everest.Connectors.Util.FromWireFormat(d7469b81f11ad4c5280ee14eee319f03c, typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ActStatus>));
}
else if(s.LocalName == "effectiveTime" ) {

			object d9574a02793a245a28735b5a9313ade1f = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.TS), currentInteractionType, resultContext); instance.EffectiveTime = d9574a02793a245a28735b5a9313ade1f is MARC.Everest.DataTypes.TS ? d9574a02793a245a28735b5a9313ade1f as MARC.Everest.DataTypes.TS : (MARC.Everest.DataTypes.TS)MARC.Everest.Connectors.Util.FromWireFormat(d9574a02793a245a28735b5a9313ade1f, typeof(MARC.Everest.DataTypes.TS));
}
else if(s.LocalName == "reasonCode" ) {

			object d72bb8b240d51475fbf35e122651497b5 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.CE<System.String>), currentInteractionType, resultContext); instance.ReasonCode = d72bb8b240d51475fbf35e122651497b5 is MARC.Everest.DataTypes.CE<System.String> ? d72bb8b240d51475fbf35e122651497b5 as MARC.Everest.DataTypes.CE<System.String> : (MARC.Everest.DataTypes.CE<System.String>)MARC.Everest.Connectors.Util.FromWireFormat(d72bb8b240d51475fbf35e122651497b5, typeof(MARC.Everest.DataTypes.CE<System.String>));
}
else if(s.LocalName == "value" ) {

			object dfc3a555db89a419aae734e109842c4aa = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.CE<System.String>), currentInteractionType, resultContext); instance.Value = dfc3a555db89a419aae734e109842c4aa is MARC.Everest.DataTypes.CE<System.String> ? dfc3a555db89a419aae734e109842c4aa as MARC.Everest.DataTypes.CE<System.String> : (MARC.Everest.DataTypes.CE<System.String>)MARC.Everest.Connectors.Util.FromWireFormat(dfc3a555db89a419aae734e109842c4aa, typeof(MARC.Everest.DataTypes.CE<System.String>));
}
else if(s.LocalName == "methodCode" ) {

			object d484e0f7e50d7419b9f3e570d58819964 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CE<System.String>>), currentInteractionType, resultContext); instance.MethodCode = d484e0f7e50d7419b9f3e570d58819964 is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CE<System.String>> ? d484e0f7e50d7419b9f3e570d58819964 as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CE<System.String>> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CE<System.String>>)MARC.Everest.Connectors.Util.FromWireFormat(d484e0f7e50d7419b9f3e570d58819964, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CE<System.String>>));
}
else if(s.LocalName == "primaryPerformer" ) {

			object d52400f9711d444a88f6958e98f457276 = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.PrimaryPerformer), currentInteractionType, resultContext); instance.PrimaryPerformer.Add(d52400f9711d444a88f6958e98f457276 is MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.PrimaryPerformer ? (MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.PrimaryPerformer)d52400f9711d444a88f6958e98f457276 : (MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.PrimaryPerformer)MARC.Everest.Connectors.Util.FromWireFormat(d52400f9711d444a88f6958e98f457276, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.PrimaryPerformer)));
}
else if(s.LocalName == "inFulfillmentOf" ) {

			object dfd64d3a8764247b4a4bff82b1cf6fba9 = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.InFulfillmentOf), currentInteractionType, resultContext); instance.InFulfillmentOf.Add(dfd64d3a8764247b4a4bff82b1cf6fba9 is MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.InFulfillmentOf ? (MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.InFulfillmentOf)dfd64d3a8764247b4a4bff82b1cf6fba9 : (MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.InFulfillmentOf)MARC.Everest.Connectors.Util.FromWireFormat(dfd64d3a8764247b4a4bff82b1cf6fba9, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.InFulfillmentOf)));
}
else if(s.LocalName == "support" ) {

			object db020ac8f4d484d0a9b3b34cea8cede0b = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Support), currentInteractionType, resultContext); instance.Support.Add(db020ac8f4d484d0a9b3b34cea8cede0b is MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Support ? (MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Support)db020ac8f4d484d0a9b3b34cea8cede0b : (MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Support)MARC.Everest.Connectors.Util.FromWireFormat(db020ac8f4d484d0a9b3b34cea8cede0b, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Support)));
}
else if(s.LocalName == "realmCode" ) {

			object da8714f022b314308a1d8bbcb71659c58 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), currentInteractionType, resultContext); instance.RealmCode = da8714f022b314308a1d8bbcb71659c58 is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> ? da8714f022b314308a1d8bbcb71659c58 as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>)MARC.Everest.Connectors.Util.FromWireFormat(da8714f022b314308a1d8bbcb71659c58, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>));
}
else if(s.LocalName == "typeId" ) {

			object d26b08a16db2448ed984da9651d5deb36 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.II), currentInteractionType, resultContext); instance.TypeId = d26b08a16db2448ed984da9651d5deb36 is MARC.Everest.DataTypes.II ? d26b08a16db2448ed984da9651d5deb36 as MARC.Everest.DataTypes.II : (MARC.Everest.DataTypes.II)MARC.Everest.Connectors.Util.FromWireFormat(d26b08a16db2448ed984da9651d5deb36, typeof(MARC.Everest.DataTypes.II));
}
else if(s.LocalName == "templateId" ) {

			object da17632d0f8064231ad004c52ef93bea8 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.TemplateId = da17632d0f8064231ad004c52ef93bea8 is MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> ? da17632d0f8064231ad004c52ef93bea8 as MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(da17632d0f8064231ad004c52ef93bea8, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>));
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotImplementedElementResultDetail(MARC.Everest.Connectors.ResultDetailType.Warning, s.LocalName, s.NamespaceURI, s.ToString(), null)); }
}
}
catch (System.Exception e) { resultContext.AddResultDetail(new MARC.Everest.Connectors.ResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, e.Message, s.ToString(), e)); }
finally { if(oldName.Equals(s.LocalName)) s.Read(); } }
			return instance;
		}
コード例 #12
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual MARC.Everest.Connectors.ResultCode Graph(System.Xml.XmlWriter s, object o, MARC.Everest.Interfaces.IGraphable context, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterGraphResult resultContext) {
			MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Verification instance = o as MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Verification;;
			MARC.Everest.Connectors.ResultCode retVal = MARC.Everest.Connectors.ResultCode.Accepted;
			if(o == null) throw new System.ArgumentNullException("o");
			if(instance == null) throw new System.ArgumentException(System.String.Format("Could not cast type '{0}' to 'MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Verification'!", o.GetType().FullName));
			bool isInstanceNull = instance.NullFlavor != null;
			bool isEntryPoint = s is MARC.Everest.Xml.XmlStateWriter && (s as MARC.Everest.Xml.XmlStateWriter).ElementStack.Count == 0 || s.WriteState == System.Xml.WriteState.Start; if(isEntryPoint) s.WriteStartElement("Verification", "urn:hl7-org:v3");
			if(isEntryPoint) s.WriteAttributeString("xmlns", "xsi", null, MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(instance.NullFlavor != null) this.Host.WriteNullFlavorUtil(s, instance.NullFlavor);
if(instance.ClassCode != null && !isInstanceNull) {

			s.WriteAttributeString("classCode", MARC.Everest.Connectors.Util.ToWireFormat(instance.ClassCode));
}
if(instance.MoodCode != null && !isInstanceNull) {

			s.WriteAttributeString("moodCode", MARC.Everest.Connectors.Util.ToWireFormat(instance.MoodCode));
}
if(instance.RealmCode != null && !isInstanceNull) {

if(!instance.RealmCode.IsEmpty)
			retVal = Host.WriteElementUtil(s, "realmCode", (MARC.Everest.Interfaces.IGraphable)instance.RealmCode, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TypeId != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "typeId", (MARC.Everest.Interfaces.IGraphable)instance.TypeId, typeof(MARC.Everest.DataTypes.II), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TemplateId != null && !isInstanceNull) {

if(!instance.TemplateId.IsEmpty)
			retVal = Host.WriteElementUtil(s, "templateId", (MARC.Everest.Interfaces.IGraphable)instance.TemplateId, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Id != null && !isInstanceNull) {

if(!instance.Id.IsEmpty)
			retVal = Host.WriteElementUtil(s, "id", (MARC.Everest.Interfaces.IGraphable)instance.Id, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Code != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "code", (MARC.Everest.Interfaces.IGraphable)instance.Code, typeof(MARC.Everest.DataTypes.CD<System.String>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.StatusCode != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "statusCode", (MARC.Everest.Interfaces.IGraphable)instance.StatusCode, typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ActStatus>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.EffectiveTime != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "effectiveTime", (MARC.Everest.Interfaces.IGraphable)instance.EffectiveTime, typeof(MARC.Everest.DataTypes.TS), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.ReasonCode != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "reasonCode", (MARC.Everest.Interfaces.IGraphable)instance.ReasonCode, typeof(MARC.Everest.DataTypes.CE<System.String>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Value != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "value", (MARC.Everest.Interfaces.IGraphable)instance.Value, typeof(MARC.Everest.DataTypes.CE<System.String>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.MethodCode != null && !isInstanceNull) {

if(!instance.MethodCode.IsEmpty)
			retVal = Host.WriteElementUtil(s, "methodCode", (MARC.Everest.Interfaces.IGraphable)instance.MethodCode, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CE<System.String>>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.PrimaryPerformer != null && !isInstanceNull) {

foreach(MARC.Everest.Interfaces.IGraphable ig in instance.PrimaryPerformer) { retVal = Host.WriteElementUtil(s, "primaryPerformer", ig, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.PrimaryPerformer), context, resultContext); }
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.InFulfillmentOf != null && !isInstanceNull) {

foreach(MARC.Everest.Interfaces.IGraphable ig in instance.InFulfillmentOf) { retVal = Host.WriteElementUtil(s, "inFulfillmentOf", ig, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.InFulfillmentOf), context, resultContext); }
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Support != null && !isInstanceNull) {

foreach(MARC.Everest.Interfaces.IGraphable ig in instance.Support) { retVal = Host.WriteElementUtil(s, "support", ig, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Support), context, resultContext); }
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
			if(isEntryPoint) s.WriteEndElement();
			return retVal;
		}
コード例 #13
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual bool Validate(MARC.Everest.Interfaces.IGraphable o, string location, out MARC.Everest.Connectors.IResultDetail[] outDetails) {
			MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.AttentionLine instance = o as MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.AttentionLine;;
			outDetails = new MARC.Everest.Connectors.IResultDetail[0]; System.Collections.Generic.List<MARC.Everest.Connectors.IResultDetail> details = new System.Collections.Generic.List<MARC.Everest.Connectors.IResultDetail>(10);;
			bool isValid = true;;
			if(instance == null && o != null) throw new System.NullReferenceException(System.String.Format("Could not cast type '{0}' to 'MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.AttentionLine'!", o.GetType().FullName));if(instance == null || instance.NullFlavor != null) return true;;
			outDetails = details.ToArray();;
			return isValid;;
		}
コード例 #14
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual object Parse(System.Xml.XmlReader s, System.Type useType, System.Type currentInteractionType, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterParseResult resultContext) {
			System.String nil = s.GetAttribute("nil", MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(!System.String.IsNullOrEmpty(nil) && System.Convert.ToBoolean(nil)) return null;;
			MARC.Everest.RMIM.UV.NE2008.COCT_MT090002UV01.AssignedEntity instance = new MARC.Everest.RMIM.UV.NE2008.COCT_MT090002UV01.AssignedEntity();;
			if(s.NodeType != System.Xml.XmlNodeType.Element) throw new System.InvalidOperationException(System.String.Format("Expected node type of Element, actual node type is '{0}'", s.NodeType));
if(s.GetAttribute("classCode") != null){ if(!"ASSIGNED".Equals(s.GetAttribute("classCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("classCode"), "ASSIGNED", false, s.ToString()));  instance.ClassCode = (MARC.Everest.DataTypes.CS<System.String>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("classCode"), typeof(MARC.Everest.DataTypes.CS<System.String>)); }
			if(s.GetAttribute("nullFlavor") != null) instance.NullFlavor = (MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("nullFlavor"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>));
			if(s.IsEmptyElement) return instance;
string sName = s.Name;
int sDepth = s.Depth;
s.Read();
while(!(s.NodeType == System.Xml.XmlNodeType.EndElement && s.Name == sName && s.Depth == sDepth)) {
string oldName = s.LocalName; 
 try { if(s.NodeType == System.Xml.XmlNodeType.Element) { 
 if(s.LocalName == "id" ) {

			object de3a9b29ccab543248ab80ecaf806e58f = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.Id = de3a9b29ccab543248ab80ecaf806e58f is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II> ? de3a9b29ccab543248ab80ecaf806e58f as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(de3a9b29ccab543248ab80ecaf806e58f, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>));
}
else if(s.LocalName == "code" ) {

			object dbc468ba441f54d8b9e7ecd7157f75f99 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.CE<System.String>), currentInteractionType, resultContext); instance.Code = dbc468ba441f54d8b9e7ecd7157f75f99 is MARC.Everest.DataTypes.CE<System.String> ? dbc468ba441f54d8b9e7ecd7157f75f99 as MARC.Everest.DataTypes.CE<System.String> : (MARC.Everest.DataTypes.CE<System.String>)MARC.Everest.Connectors.Util.FromWireFormat(dbc468ba441f54d8b9e7ecd7157f75f99, typeof(MARC.Everest.DataTypes.CE<System.String>));
}
else if(s.LocalName == "addr" ) {

			object d4bee5ce485db4f3c8b6f308c8a051fa7 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.AD>), currentInteractionType, resultContext); instance.Addr = d4bee5ce485db4f3c8b6f308c8a051fa7 is MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.AD> ? d4bee5ce485db4f3c8b6f308c8a051fa7 as MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.AD> : (MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.AD>)MARC.Everest.Connectors.Util.FromWireFormat(d4bee5ce485db4f3c8b6f308c8a051fa7, typeof(MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.AD>));
}
else if(s.LocalName == "assignedPerson" ) {

			object d6a8832c34e384c4fb99c4d34e5f88e65 = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT090103UV01.Person), currentInteractionType, resultContext); instance.AssignedPrincipalChoiceList = d6a8832c34e384c4fb99c4d34e5f88e65 is MARC.Everest.RMIM.UV.NE2008.COCT_MT090103UV01.Person ? d6a8832c34e384c4fb99c4d34e5f88e65 as MARC.Everest.RMIM.UV.NE2008.COCT_MT090103UV01.Person : (MARC.Everest.RMIM.UV.NE2008.COCT_MT090103UV01.Person)MARC.Everest.Connectors.Util.FromWireFormat(d6a8832c34e384c4fb99c4d34e5f88e65, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT090103UV01.Person));
}
else if(s.LocalName == "assignedOrganization" ) {

			object defa31c409b0a49a1aed3968585188751 = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT090203UV01.Organization), currentInteractionType, resultContext); instance.AssignedPrincipalChoiceList = defa31c409b0a49a1aed3968585188751 is MARC.Everest.RMIM.UV.NE2008.COCT_MT090203UV01.Organization ? defa31c409b0a49a1aed3968585188751 as MARC.Everest.RMIM.UV.NE2008.COCT_MT090203UV01.Organization : (MARC.Everest.RMIM.UV.NE2008.COCT_MT090203UV01.Organization)MARC.Everest.Connectors.Util.FromWireFormat(defa31c409b0a49a1aed3968585188751, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT090203UV01.Organization));
}
else if(s.LocalName == "assignedDevice" ) {

			object dad45bdd08eed44fe9d9e1e5153de183f = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT090303UV01.Device), currentInteractionType, resultContext); instance.AssignedPrincipalChoiceList = dad45bdd08eed44fe9d9e1e5153de183f is MARC.Everest.RMIM.UV.NE2008.COCT_MT090303UV01.Device ? dad45bdd08eed44fe9d9e1e5153de183f as MARC.Everest.RMIM.UV.NE2008.COCT_MT090303UV01.Device : (MARC.Everest.RMIM.UV.NE2008.COCT_MT090303UV01.Device)MARC.Everest.Connectors.Util.FromWireFormat(dad45bdd08eed44fe9d9e1e5153de183f, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT090303UV01.Device));
}
else if(s.LocalName == "representedOrganization" ) {

			object d7490f1abcf574486b893676ef4bc3553 = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT150002UV01.Organization), currentInteractionType, resultContext); instance.RepresentedOrganization = d7490f1abcf574486b893676ef4bc3553 is MARC.Everest.RMIM.UV.NE2008.COCT_MT150002UV01.Organization ? d7490f1abcf574486b893676ef4bc3553 as MARC.Everest.RMIM.UV.NE2008.COCT_MT150002UV01.Organization : (MARC.Everest.RMIM.UV.NE2008.COCT_MT150002UV01.Organization)MARC.Everest.Connectors.Util.FromWireFormat(d7490f1abcf574486b893676ef4bc3553, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT150002UV01.Organization));
}
else if(s.LocalName == "realmCode" ) {

			object d1f9eca31615844cc9ff3936e6229ad9a = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), currentInteractionType, resultContext); instance.RealmCode = d1f9eca31615844cc9ff3936e6229ad9a is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> ? d1f9eca31615844cc9ff3936e6229ad9a as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>)MARC.Everest.Connectors.Util.FromWireFormat(d1f9eca31615844cc9ff3936e6229ad9a, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>));
}
else if(s.LocalName == "typeId" ) {

			object d189c468608cf4738b6f9e5a578443037 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.II), currentInteractionType, resultContext); instance.TypeId = d189c468608cf4738b6f9e5a578443037 is MARC.Everest.DataTypes.II ? d189c468608cf4738b6f9e5a578443037 as MARC.Everest.DataTypes.II : (MARC.Everest.DataTypes.II)MARC.Everest.Connectors.Util.FromWireFormat(d189c468608cf4738b6f9e5a578443037, typeof(MARC.Everest.DataTypes.II));
}
else if(s.LocalName == "templateId" ) {

			object dc1e68f67bb434772bf35ff19439d6727 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.TemplateId = dc1e68f67bb434772bf35ff19439d6727 is MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> ? dc1e68f67bb434772bf35ff19439d6727 as MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(dc1e68f67bb434772bf35ff19439d6727, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>));
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotImplementedElementResultDetail(MARC.Everest.Connectors.ResultDetailType.Warning, s.LocalName, s.NamespaceURI, s.ToString(), null)); }
}
}
catch (System.Exception e) { resultContext.AddResultDetail(new MARC.Everest.Connectors.ResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, e.Message, s.ToString(), e)); }
finally { if(oldName.Equals(s.LocalName)) s.Read(); } }
			return instance;
		}
コード例 #15
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual MARC.Everest.Connectors.ResultCode Graph(System.Xml.XmlWriter s, object o, MARC.Everest.Interfaces.IGraphable context, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterGraphResult resultContext) {
			MARC.Everest.RMIM.UV.NE2008.COCT_MT090002UV01.AssignedEntity instance = o as MARC.Everest.RMIM.UV.NE2008.COCT_MT090002UV01.AssignedEntity;;
			MARC.Everest.Connectors.ResultCode retVal = MARC.Everest.Connectors.ResultCode.Accepted;
			if(o == null) throw new System.ArgumentNullException("o");
			if(instance == null) throw new System.ArgumentException(System.String.Format("Could not cast type '{0}' to 'MARC.Everest.RMIM.UV.NE2008.COCT_MT090002UV01.AssignedEntity'!", o.GetType().FullName));
			bool isInstanceNull = instance.NullFlavor != null;
			bool isEntryPoint = s is MARC.Everest.Xml.XmlStateWriter && (s as MARC.Everest.Xml.XmlStateWriter).ElementStack.Count == 0 || s.WriteState == System.Xml.WriteState.Start; if(isEntryPoint) s.WriteStartElement("AssignedEntity", "urn:hl7-org:v3");
			if(isEntryPoint) s.WriteAttributeString("xmlns", "xsi", null, MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(instance.NullFlavor != null) this.Host.WriteNullFlavorUtil(s, instance.NullFlavor);
if(instance.ClassCode != null && !isInstanceNull) {

			s.WriteAttributeString("classCode", MARC.Everest.Connectors.Util.ToWireFormat(instance.ClassCode));
}
if(instance.RealmCode != null && !isInstanceNull) {

if(!instance.RealmCode.IsEmpty)
			retVal = Host.WriteElementUtil(s, "realmCode", (MARC.Everest.Interfaces.IGraphable)instance.RealmCode, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TypeId != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "typeId", (MARC.Everest.Interfaces.IGraphable)instance.TypeId, typeof(MARC.Everest.DataTypes.II), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TemplateId != null && !isInstanceNull) {

if(!instance.TemplateId.IsEmpty)
			retVal = Host.WriteElementUtil(s, "templateId", (MARC.Everest.Interfaces.IGraphable)instance.TemplateId, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Id != null && !isInstanceNull) {

if(!instance.Id.IsEmpty)
			retVal = Host.WriteElementUtil(s, "id", (MARC.Everest.Interfaces.IGraphable)instance.Id, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Code == null && Host.CreateRequiredElements) { instance.Code = new MARC.Everest.DataTypes.CE<System.String>(); instance.Code.NullFlavor = MARC.Everest.DataTypes.NullFlavor.NoInformation; }
if(instance.Code != null && !isInstanceNull) {

			if((host.Settings & MARC.Everest.Formatters.XML.ITS1.SettingsType.AllowSupplierDomainImposing) == MARC.Everest.Formatters.XML.ITS1.SettingsType.AllowSupplierDomainImposing && System.String.IsNullOrEmpty(instance.Code.CodeSystem) && instance.Code.NullFlavor == null) instance.Code.CodeSystem = "2.16.840.1.113883.5.111";
			retVal = Host.WriteElementUtil(s, "code", (MARC.Everest.Interfaces.IGraphable)instance.Code, typeof(MARC.Everest.DataTypes.CE<System.String>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Addr != null && !isInstanceNull) {

if(!instance.Addr.IsEmpty)
			retVal = Host.WriteElementUtil(s, "addr", (MARC.Everest.Interfaces.IGraphable)instance.Addr, typeof(MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.AD>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.AssignedPrincipalChoiceList != null && !isInstanceNull) {

 if(instance.AssignedPrincipalChoiceList.GetType() == typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT090103UV01.Person)) {

			retVal = Host.WriteElementUtil(s, "assignedPerson", (MARC.Everest.Interfaces.IGraphable)instance.AssignedPrincipalChoiceList, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT090103UV01.Person), context, resultContext);
}
else if(instance.AssignedPrincipalChoiceList.GetType() == typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT090203UV01.Organization)) {

			retVal = Host.WriteElementUtil(s, "assignedOrganization", (MARC.Everest.Interfaces.IGraphable)instance.AssignedPrincipalChoiceList, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT090203UV01.Organization), context, resultContext);
}
else if(instance.AssignedPrincipalChoiceList.GetType() == typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT090303UV01.Device)) {

			retVal = Host.WriteElementUtil(s, "assignedDevice", (MARC.Everest.Interfaces.IGraphable)instance.AssignedPrincipalChoiceList, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT090303UV01.Device), context, resultContext);
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotSupportedChoiceResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, System.String.Format("Type {0} is not a valid choice according to available choice elements", instance.AssignedPrincipalChoiceList.GetType()), s.ToString(), null)); }
}
if(instance.RepresentedOrganization != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "representedOrganization", (MARC.Everest.Interfaces.IGraphable)instance.RepresentedOrganization, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT150002UV01.Organization), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
			if(isEntryPoint) s.WriteEndElement();
			return retVal;
		}
コード例 #16
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual object Parse(System.Xml.XmlReader s, System.Type useType, System.Type currentInteractionType, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterParseResult resultContext) {
			System.String nil = s.GetAttribute("nil", MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(!System.String.IsNullOrEmpty(nil) && System.Convert.ToBoolean(nil)) return null;;
			MARC.Everest.RMIM.UV.NE2008.COCT_MT150000UV02.OrganizationPartOf instance = new MARC.Everest.RMIM.UV.NE2008.COCT_MT150000UV02.OrganizationPartOf();;
			if(s.NodeType != System.Xml.XmlNodeType.Element) throw new System.InvalidOperationException(System.String.Format("Expected node type of Element, actual node type is '{0}'", s.NodeType));
if(s.GetAttribute("classCode") != null){ if(!"PART".Equals(s.GetAttribute("classCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("classCode"), "PART", false, s.ToString()));  instance.ClassCode = (MARC.Everest.DataTypes.CS<System.String>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("classCode"), typeof(MARC.Everest.DataTypes.CS<System.String>)); }
			if(s.GetAttribute("nullFlavor") != null) instance.NullFlavor = (MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("nullFlavor"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>));
			if(s.IsEmptyElement) return instance;
string sName = s.Name;
int sDepth = s.Depth;
s.Read();
while(!(s.NodeType == System.Xml.XmlNodeType.EndElement && s.Name == sName && s.Depth == sDepth)) {
string oldName = s.LocalName; 
 try { if(s.NodeType == System.Xml.XmlNodeType.Element) { 
 if(s.LocalName == "id" ) {

			object dd4dc3bb31d644ce5893528d6ec78cdf0 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.Id = dd4dc3bb31d644ce5893528d6ec78cdf0 is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II> ? dd4dc3bb31d644ce5893528d6ec78cdf0 as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(dd4dc3bb31d644ce5893528d6ec78cdf0, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>));
}
else if(s.LocalName == "code" ) {

			object d04dc222e7bdf415b9f7abada465eff01 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.CE<System.String>), currentInteractionType, resultContext); instance.Code = d04dc222e7bdf415b9f7abada465eff01 is MARC.Everest.DataTypes.CE<System.String> ? d04dc222e7bdf415b9f7abada465eff01 as MARC.Everest.DataTypes.CE<System.String> : (MARC.Everest.DataTypes.CE<System.String>)MARC.Everest.Connectors.Util.FromWireFormat(d04dc222e7bdf415b9f7abada465eff01, typeof(MARC.Everest.DataTypes.CE<System.String>));
}
else if(s.LocalName == "statusCode" ) {

			object d523ce662073549ec9678ea1917e24c3c = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.RoleStatus>), currentInteractionType, resultContext); instance.StatusCode = d523ce662073549ec9678ea1917e24c3c is MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.RoleStatus> ? d523ce662073549ec9678ea1917e24c3c as MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.RoleStatus> : (MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.RoleStatus>)MARC.Everest.Connectors.Util.FromWireFormat(d523ce662073549ec9678ea1917e24c3c, typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.RoleStatus>));
}
else if(s.LocalName == "effectiveTime" ) {

			object d179ffcbdedc34948a2d9a2544cf049eb = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.IVL<MARC.Everest.DataTypes.TS>), currentInteractionType, resultContext); instance.EffectiveTime = d179ffcbdedc34948a2d9a2544cf049eb is MARC.Everest.DataTypes.IVL<MARC.Everest.DataTypes.TS> ? d179ffcbdedc34948a2d9a2544cf049eb as MARC.Everest.DataTypes.IVL<MARC.Everest.DataTypes.TS> : (MARC.Everest.DataTypes.IVL<MARC.Everest.DataTypes.TS>)MARC.Everest.Connectors.Util.FromWireFormat(d179ffcbdedc34948a2d9a2544cf049eb, typeof(MARC.Everest.DataTypes.IVL<MARC.Everest.DataTypes.TS>));
}
else if(s.LocalName == "wholeOrganization" ) {

			object d39b5a3723e6c437fa489759c0ddce42d = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT150000UV02.Organization), currentInteractionType, resultContext); instance.WholeOrganization = d39b5a3723e6c437fa489759c0ddce42d is MARC.Everest.RMIM.UV.NE2008.COCT_MT150000UV02.Organization ? d39b5a3723e6c437fa489759c0ddce42d as MARC.Everest.RMIM.UV.NE2008.COCT_MT150000UV02.Organization : (MARC.Everest.RMIM.UV.NE2008.COCT_MT150000UV02.Organization)MARC.Everest.Connectors.Util.FromWireFormat(d39b5a3723e6c437fa489759c0ddce42d, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT150000UV02.Organization));
}
else if(s.LocalName == "realmCode" ) {

			object dabee0463e5634a579ec111d738897993 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), currentInteractionType, resultContext); instance.RealmCode = dabee0463e5634a579ec111d738897993 is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> ? dabee0463e5634a579ec111d738897993 as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>)MARC.Everest.Connectors.Util.FromWireFormat(dabee0463e5634a579ec111d738897993, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>));
}
else if(s.LocalName == "typeId" ) {

			object d322b9652df9649e18d4ebabb354fc7ff = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.II), currentInteractionType, resultContext); instance.TypeId = d322b9652df9649e18d4ebabb354fc7ff is MARC.Everest.DataTypes.II ? d322b9652df9649e18d4ebabb354fc7ff as MARC.Everest.DataTypes.II : (MARC.Everest.DataTypes.II)MARC.Everest.Connectors.Util.FromWireFormat(d322b9652df9649e18d4ebabb354fc7ff, typeof(MARC.Everest.DataTypes.II));
}
else if(s.LocalName == "templateId" ) {

			object dc3552f914d424be9bdc5fcc300c47cbd = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.TemplateId = dc3552f914d424be9bdc5fcc300c47cbd is MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> ? dc3552f914d424be9bdc5fcc300c47cbd as MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(dc3552f914d424be9bdc5fcc300c47cbd, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>));
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotImplementedElementResultDetail(MARC.Everest.Connectors.ResultDetailType.Warning, s.LocalName, s.NamespaceURI, s.ToString(), null)); }
}
}
catch (System.Exception e) { resultContext.AddResultDetail(new MARC.Everest.Connectors.ResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, e.Message, s.ToString(), e)); }
finally { if(oldName.Equals(s.LocalName)) s.Read(); } }
			return instance;
		}
コード例 #17
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual MARC.Everest.Connectors.ResultCode Graph(System.Xml.XmlWriter s, object o, MARC.Everest.Interfaces.IGraphable context, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterGraphResult resultContext) {
			MARC.Everest.RMIM.UV.NE2008.COCT_MT150000UV02.OrganizationPartOf instance = o as MARC.Everest.RMIM.UV.NE2008.COCT_MT150000UV02.OrganizationPartOf;;
			MARC.Everest.Connectors.ResultCode retVal = MARC.Everest.Connectors.ResultCode.Accepted;
			if(o == null) throw new System.ArgumentNullException("o");
			if(instance == null) throw new System.ArgumentException(System.String.Format("Could not cast type '{0}' to 'MARC.Everest.RMIM.UV.NE2008.COCT_MT150000UV02.OrganizationPartOf'!", o.GetType().FullName));
			bool isInstanceNull = instance.NullFlavor != null;
			if(instance.NullFlavor != null) this.Host.WriteNullFlavorUtil(s, instance.NullFlavor);
if(instance.ClassCode != null && !isInstanceNull) {

			s.WriteAttributeString("classCode", MARC.Everest.Connectors.Util.ToWireFormat(instance.ClassCode));
}
if(instance.RealmCode != null && !isInstanceNull) {

if(!instance.RealmCode.IsEmpty)
			retVal = Host.WriteElementUtil(s, "realmCode", (MARC.Everest.Interfaces.IGraphable)instance.RealmCode, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TypeId != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "typeId", (MARC.Everest.Interfaces.IGraphable)instance.TypeId, typeof(MARC.Everest.DataTypes.II), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TemplateId != null && !isInstanceNull) {

if(!instance.TemplateId.IsEmpty)
			retVal = Host.WriteElementUtil(s, "templateId", (MARC.Everest.Interfaces.IGraphable)instance.TemplateId, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Id != null && !isInstanceNull) {

if(!instance.Id.IsEmpty)
			retVal = Host.WriteElementUtil(s, "id", (MARC.Everest.Interfaces.IGraphable)instance.Id, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Code != null && !isInstanceNull) {

			if((host.Settings & MARC.Everest.Formatters.XML.ITS1.SettingsType.AllowSupplierDomainImposing) == MARC.Everest.Formatters.XML.ITS1.SettingsType.AllowSupplierDomainImposing && System.String.IsNullOrEmpty(instance.Code.CodeSystem) && instance.Code.NullFlavor == null) instance.Code.CodeSystem = "2.16.840.1.113883.5.111";
			retVal = Host.WriteElementUtil(s, "code", (MARC.Everest.Interfaces.IGraphable)instance.Code, typeof(MARC.Everest.DataTypes.CE<System.String>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.StatusCode != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "statusCode", (MARC.Everest.Interfaces.IGraphable)instance.StatusCode, typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.RoleStatus>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.EffectiveTime != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "effectiveTime", (MARC.Everest.Interfaces.IGraphable)instance.EffectiveTime, typeof(MARC.Everest.DataTypes.IVL<MARC.Everest.DataTypes.TS>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.WholeOrganization != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "wholeOrganization", (MARC.Everest.Interfaces.IGraphable)instance.WholeOrganization, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT150000UV02.Organization), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
			return retVal;
		}
コード例 #18
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual MARC.Everest.Connectors.ResultCode Graph(System.Xml.XmlWriter s, object o, MARC.Everest.Interfaces.IGraphable context, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterGraphResult resultContext) {
			MARC.Everest.RMIM.UV.NE2008.COCT_MT510000UV06.Part instance = o as MARC.Everest.RMIM.UV.NE2008.COCT_MT510000UV06.Part;;
			MARC.Everest.Connectors.ResultCode retVal = MARC.Everest.Connectors.ResultCode.Accepted;
			if(o == null) throw new System.ArgumentNullException("o");
			if(instance == null) throw new System.ArgumentException(System.String.Format("Could not cast type '{0}' to 'MARC.Everest.RMIM.UV.NE2008.COCT_MT510000UV06.Part'!", o.GetType().FullName));
			bool isInstanceNull = instance.NullFlavor != null;
			if(instance.NullFlavor != null) this.Host.WriteNullFlavorUtil(s, instance.NullFlavor);
if(instance.TypeCode != null && !isInstanceNull) {

			s.WriteAttributeString("typeCode", MARC.Everest.Connectors.Util.ToWireFormat(instance.TypeCode));
}
if(instance.RealmCode != null && !isInstanceNull) {

if(!instance.RealmCode.IsEmpty)
			retVal = Host.WriteElementUtil(s, "realmCode", (MARC.Everest.Interfaces.IGraphable)instance.RealmCode, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TypeId != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "typeId", (MARC.Everest.Interfaces.IGraphable)instance.TypeId, typeof(MARC.Everest.DataTypes.II), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TemplateId != null && !isInstanceNull) {

if(!instance.TemplateId.IsEmpty)
			retVal = Host.WriteElementUtil(s, "templateId", (MARC.Everest.Interfaces.IGraphable)instance.TemplateId, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.PriorityNumber != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "priorityNumber", (MARC.Everest.Interfaces.IGraphable)instance.PriorityNumber, typeof(MARC.Everest.DataTypes.INT), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.EffectiveTime != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "effectiveTime", (MARC.Everest.Interfaces.IGraphable)instance.EffectiveTime, typeof(MARC.Everest.DataTypes.IVL<MARC.Everest.DataTypes.TS>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.PersonalRelationship != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "personalRelationship", (MARC.Everest.Interfaces.IGraphable)instance.PersonalRelationship, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT510000UV06.PersonalRelationship), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
			return retVal;
		}
コード例 #19
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual object Parse(System.Xml.XmlReader s, System.Type useType, System.Type currentInteractionType, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterParseResult resultContext) {
			System.String nil = s.GetAttribute("nil", MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(!System.String.IsNullOrEmpty(nil) && System.Convert.ToBoolean(nil)) return null;;
			MARC.Everest.RMIM.UV.NE2008.COCT_MT510000UV06.Part instance = new MARC.Everest.RMIM.UV.NE2008.COCT_MT510000UV06.Part();;
			if(s.NodeType != System.Xml.XmlNodeType.Element) throw new System.InvalidOperationException(System.String.Format("Expected node type of Element, actual node type is '{0}'", s.NodeType));
if(s.GetAttribute("typeCode") != null){ if(!"PART".Equals(s.GetAttribute("typeCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("typeCode"), "PART", false, s.ToString()));  instance.TypeCode = (MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.RoleLinkType>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("typeCode"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.RoleLinkType>)); }
			if(s.GetAttribute("nullFlavor") != null) instance.NullFlavor = (MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("nullFlavor"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>));
			if(s.IsEmptyElement) return instance;
string sName = s.Name;
int sDepth = s.Depth;
s.Read();
while(!(s.NodeType == System.Xml.XmlNodeType.EndElement && s.Name == sName && s.Depth == sDepth)) {
string oldName = s.LocalName; 
 try { if(s.NodeType == System.Xml.XmlNodeType.Element) { 
 if(s.LocalName == "priorityNumber" ) {

			object d36e310ad261640549e1638ad6b720909 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.INT), currentInteractionType, resultContext); instance.PriorityNumber = d36e310ad261640549e1638ad6b720909 is MARC.Everest.DataTypes.INT ? d36e310ad261640549e1638ad6b720909 as MARC.Everest.DataTypes.INT : (MARC.Everest.DataTypes.INT)MARC.Everest.Connectors.Util.FromWireFormat(d36e310ad261640549e1638ad6b720909, typeof(MARC.Everest.DataTypes.INT));
}
else if(s.LocalName == "effectiveTime" ) {

			object d1d921c2a3cac4135af9f1f1440ab3d8a = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.IVL<MARC.Everest.DataTypes.TS>), currentInteractionType, resultContext); instance.EffectiveTime = d1d921c2a3cac4135af9f1f1440ab3d8a is MARC.Everest.DataTypes.IVL<MARC.Everest.DataTypes.TS> ? d1d921c2a3cac4135af9f1f1440ab3d8a as MARC.Everest.DataTypes.IVL<MARC.Everest.DataTypes.TS> : (MARC.Everest.DataTypes.IVL<MARC.Everest.DataTypes.TS>)MARC.Everest.Connectors.Util.FromWireFormat(d1d921c2a3cac4135af9f1f1440ab3d8a, typeof(MARC.Everest.DataTypes.IVL<MARC.Everest.DataTypes.TS>));
}
else if(s.LocalName == "personalRelationship" ) {

			object de3856ca8000346e78b92a8f796448c86 = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT510000UV06.PersonalRelationship), currentInteractionType, resultContext); instance.PersonalRelationship = de3856ca8000346e78b92a8f796448c86 is MARC.Everest.RMIM.UV.NE2008.COCT_MT510000UV06.PersonalRelationship ? de3856ca8000346e78b92a8f796448c86 as MARC.Everest.RMIM.UV.NE2008.COCT_MT510000UV06.PersonalRelationship : (MARC.Everest.RMIM.UV.NE2008.COCT_MT510000UV06.PersonalRelationship)MARC.Everest.Connectors.Util.FromWireFormat(de3856ca8000346e78b92a8f796448c86, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT510000UV06.PersonalRelationship));
}
else if(s.LocalName == "realmCode" ) {

			object d15594cc79b924672ad646ba5fd6d2123 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), currentInteractionType, resultContext); instance.RealmCode = d15594cc79b924672ad646ba5fd6d2123 is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> ? d15594cc79b924672ad646ba5fd6d2123 as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>)MARC.Everest.Connectors.Util.FromWireFormat(d15594cc79b924672ad646ba5fd6d2123, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>));
}
else if(s.LocalName == "typeId" ) {

			object d4f91ca055fa14cc8b54624222f5489b3 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.II), currentInteractionType, resultContext); instance.TypeId = d4f91ca055fa14cc8b54624222f5489b3 is MARC.Everest.DataTypes.II ? d4f91ca055fa14cc8b54624222f5489b3 as MARC.Everest.DataTypes.II : (MARC.Everest.DataTypes.II)MARC.Everest.Connectors.Util.FromWireFormat(d4f91ca055fa14cc8b54624222f5489b3, typeof(MARC.Everest.DataTypes.II));
}
else if(s.LocalName == "templateId" ) {

			object d97a17c7e657840c3b479a076107c4ce0 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.TemplateId = d97a17c7e657840c3b479a076107c4ce0 is MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> ? d97a17c7e657840c3b479a076107c4ce0 as MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(d97a17c7e657840c3b479a076107c4ce0, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>));
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotImplementedElementResultDetail(MARC.Everest.Connectors.ResultDetailType.Warning, s.LocalName, s.NamespaceURI, s.ToString(), null)); }
}
}
catch (System.Exception e) { resultContext.AddResultDetail(new MARC.Everest.Connectors.ResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, e.Message, s.ToString(), e)); }
finally { if(oldName.Equals(s.LocalName)) s.Read(); } }
			return instance;
		}
コード例 #20
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual MARC.Everest.Connectors.ResultCode Graph(System.Xml.XmlWriter s, object o, MARC.Everest.Interfaces.IGraphable context, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterGraphResult resultContext) {
			MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.Place instance = o as MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.Place;;
			MARC.Everest.Connectors.ResultCode retVal = MARC.Everest.Connectors.ResultCode.Accepted;
			if(o == null) throw new System.ArgumentNullException("o");
			if(instance == null) throw new System.ArgumentException(System.String.Format("Could not cast type '{0}' to 'MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.Place'!", o.GetType().FullName));
			bool isInstanceNull = instance.NullFlavor != null;
			bool isEntryPoint = s is MARC.Everest.Xml.XmlStateWriter && (s as MARC.Everest.Xml.XmlStateWriter).ElementStack.Count == 0 || s.WriteState == System.Xml.WriteState.Start; if(isEntryPoint) s.WriteStartElement("Place", "urn:hl7-org:v3");
			if(isEntryPoint) s.WriteAttributeString("xmlns", "xsi", null, MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(instance.NullFlavor != null) this.Host.WriteNullFlavorUtil(s, instance.NullFlavor);
if(instance.ClassCode != null && !isInstanceNull) {

			s.WriteAttributeString("classCode", MARC.Everest.Connectors.Util.ToWireFormat(instance.ClassCode));
}
if(instance.DeterminerCode != null && !isInstanceNull) {

			s.WriteAttributeString("determinerCode", MARC.Everest.Connectors.Util.ToWireFormat(instance.DeterminerCode));
}
if(instance.RealmCode != null && !isInstanceNull) {

if(!instance.RealmCode.IsEmpty)
			retVal = Host.WriteElementUtil(s, "realmCode", (MARC.Everest.Interfaces.IGraphable)instance.RealmCode, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TypeId != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "typeId", (MARC.Everest.Interfaces.IGraphable)instance.TypeId, typeof(MARC.Everest.DataTypes.II), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TemplateId != null && !isInstanceNull) {

if(!instance.TemplateId.IsEmpty)
			retVal = Host.WriteElementUtil(s, "templateId", (MARC.Everest.Interfaces.IGraphable)instance.TemplateId, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Id != null && !isInstanceNull) {

if(!instance.Id.IsEmpty)
			retVal = Host.WriteElementUtil(s, "id", (MARC.Everest.Interfaces.IGraphable)instance.Id, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Code != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "code", (MARC.Everest.Interfaces.IGraphable)instance.Code, typeof(MARC.Everest.DataTypes.CE<System.String>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Name != null && !isInstanceNull) {

if(!instance.Name.IsEmpty)
			retVal = Host.WriteElementUtil(s, "name", (MARC.Everest.Interfaces.IGraphable)instance.Name, typeof(MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.EN>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Desc != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "desc", (MARC.Everest.Interfaces.IGraphable)instance.Desc, typeof(MARC.Everest.DataTypes.ED), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.DirectionsText != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "directionsText", (MARC.Everest.Interfaces.IGraphable)instance.DirectionsText, typeof(MARC.Everest.DataTypes.ED), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.PositionText != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "positionText", (MARC.Everest.Interfaces.IGraphable)instance.PositionText, typeof(MARC.Everest.DataTypes.ED), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.GpsText != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "gpsText", (MARC.Everest.Interfaces.IGraphable)instance.GpsText, typeof(MARC.Everest.DataTypes.ST), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.AsLocatedEntityPartOf != null && !isInstanceNull) {

foreach(MARC.Everest.Interfaces.IGraphable ig in instance.AsLocatedEntityPartOf) { retVal = Host.WriteElementUtil(s, "asLocatedEntityPartOf", ig, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.LocatedEntityPartOf), context, resultContext); }
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.LocatedEntityHasParts != null && !isInstanceNull) {

foreach(MARC.Everest.Interfaces.IGraphable ig in instance.LocatedEntityHasParts) { retVal = Host.WriteElementUtil(s, "locatedEntityHasParts", ig, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.LocatedEntityHasParts), context, resultContext); }
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
			if(isEntryPoint) s.WriteEndElement();
			return retVal;
		}
コード例 #21
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual MARC.Everest.Connectors.ResultCode Graph(System.Xml.XmlWriter s, object o, MARC.Everest.Interfaces.IGraphable context, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterGraphResult resultContext) {
			MARC.Everest.RMIM.UV.NE2008.COCT_MT510000UV06.PersonalRelationship instance = o as MARC.Everest.RMIM.UV.NE2008.COCT_MT510000UV06.PersonalRelationship;;
			MARC.Everest.Connectors.ResultCode retVal = MARC.Everest.Connectors.ResultCode.Accepted;
			if(o == null) throw new System.ArgumentNullException("o");
			if(instance == null) throw new System.ArgumentException(System.String.Format("Could not cast type '{0}' to 'MARC.Everest.RMIM.UV.NE2008.COCT_MT510000UV06.PersonalRelationship'!", o.GetType().FullName));
			bool isInstanceNull = instance.NullFlavor != null;
			if(instance.NullFlavor != null) this.Host.WriteNullFlavorUtil(s, instance.NullFlavor);
if(instance.ClassCode != null && !isInstanceNull) {

			s.WriteAttributeString("classCode", MARC.Everest.Connectors.Util.ToWireFormat(instance.ClassCode));
}
if(instance.RealmCode != null && !isInstanceNull) {

if(!instance.RealmCode.IsEmpty)
			retVal = Host.WriteElementUtil(s, "realmCode", (MARC.Everest.Interfaces.IGraphable)instance.RealmCode, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TypeId != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "typeId", (MARC.Everest.Interfaces.IGraphable)instance.TypeId, typeof(MARC.Everest.DataTypes.II), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TemplateId != null && !isInstanceNull) {

if(!instance.TemplateId.IsEmpty)
			retVal = Host.WriteElementUtil(s, "templateId", (MARC.Everest.Interfaces.IGraphable)instance.TemplateId, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Id != null && !isInstanceNull) {

if(!instance.Id.IsEmpty)
			retVal = Host.WriteElementUtil(s, "id", (MARC.Everest.Interfaces.IGraphable)instance.Id, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Code == null && Host.CreateRequiredElements) { instance.Code = new MARC.Everest.DataTypes.CE<System.String>(); instance.Code.NullFlavor = MARC.Everest.DataTypes.NullFlavor.NoInformation; }
if(instance.Code != null && !isInstanceNull) {

			if((host.Settings & MARC.Everest.Formatters.XML.ITS1.SettingsType.AllowSupplierDomainImposing) == MARC.Everest.Formatters.XML.ITS1.SettingsType.AllowSupplierDomainImposing && System.String.IsNullOrEmpty(instance.Code.CodeSystem) && instance.Code.NullFlavor == null) instance.Code.CodeSystem = "";
			retVal = Host.WriteElementUtil(s, "code", (MARC.Everest.Interfaces.IGraphable)instance.Code, typeof(MARC.Everest.DataTypes.CE<System.String>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.RelationshipHolder != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "relationshipHolder", (MARC.Everest.Interfaces.IGraphable)instance.RelationshipHolder, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.Person), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.PersonalRelationshipWith != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "personalRelationshipWith", (MARC.Everest.Interfaces.IGraphable)instance.PersonalRelationshipWith, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT510005UV06.Person), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
			return retVal;
		}
コード例 #22
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual MARC.Everest.Connectors.ResultCode Graph(System.Xml.XmlWriter s, object o, MARC.Everest.Interfaces.IGraphable context, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterGraphResult resultContext) {
			MARC.Everest.RMIM.UV.NE2008.Interactions.PRPA_IN201306UV02 instance = o as MARC.Everest.RMIM.UV.NE2008.Interactions.PRPA_IN201306UV02;;
			MARC.Everest.Connectors.ResultCode retVal = MARC.Everest.Connectors.ResultCode.Accepted;
			if(o == null) throw new System.ArgumentNullException("o");
			if(instance == null) throw new System.ArgumentException(System.String.Format("Could not cast type '{0}' to 'MARC.Everest.RMIM.UV.NE2008.Interactions.PRPA_IN201306UV02'!", o.GetType().FullName));
			bool isInstanceNull = instance.NullFlavor != null;
			bool isEntryPoint = true; s.WriteStartElement("PRPA_IN201306UV02", "urn:hl7-org:v3");
			s.WriteAttributeString("ITSVersion","XML_1.0");
			if(isEntryPoint) s.WriteAttributeString("xmlns", "xsi", null, MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(instance.NullFlavor != null) this.Host.WriteNullFlavorUtil(s, instance.NullFlavor);
if(instance.RealmCode != null && !isInstanceNull) {

if(!instance.RealmCode.IsEmpty)
			retVal = Host.WriteElementUtil(s, "realmCode", (MARC.Everest.Interfaces.IGraphable)instance.RealmCode, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TypeId != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "typeId", (MARC.Everest.Interfaces.IGraphable)instance.TypeId, typeof(MARC.Everest.DataTypes.II), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.TemplateId != null && !isInstanceNull) {

if(!instance.TemplateId.IsEmpty)
			retVal = Host.WriteElementUtil(s, "templateId", (MARC.Everest.Interfaces.IGraphable)instance.TemplateId, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Id != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "id", (MARC.Everest.Interfaces.IGraphable)instance.Id, typeof(MARC.Everest.DataTypes.II), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.CreationTime != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "creationTime", (MARC.Everest.Interfaces.IGraphable)instance.CreationTime, typeof(MARC.Everest.DataTypes.TS), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.SecurityText != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "securityText", (MARC.Everest.Interfaces.IGraphable)instance.SecurityText, typeof(MARC.Everest.DataTypes.ST), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.VersionCode != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "versionCode", (MARC.Everest.Interfaces.IGraphable)instance.VersionCode, typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.HL7StandardVersionCode>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.InteractionId != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "interactionId", (MARC.Everest.Interfaces.IGraphable)instance.InteractionId, typeof(MARC.Everest.DataTypes.II), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.ProfileId != null && !isInstanceNull) {

if(!instance.ProfileId.IsEmpty)
			retVal = Host.WriteElementUtil(s, "profileId", (MARC.Everest.Interfaces.IGraphable)instance.ProfileId, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.ProcessingCode != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "processingCode", (MARC.Everest.Interfaces.IGraphable)instance.ProcessingCode, typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ProcessingID>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.ProcessingModeCode != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "processingModeCode", (MARC.Everest.Interfaces.IGraphable)instance.ProcessingModeCode, typeof(MARC.Everest.DataTypes.CS<System.String>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.AcceptAckCode != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "acceptAckCode", (MARC.Everest.Interfaces.IGraphable)instance.AcceptAckCode, typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.AcknowledgementCondition>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.AttachmentText != null && !isInstanceNull) {

if(!instance.AttachmentText.IsEmpty)
			retVal = Host.WriteElementUtil(s, "attachmentText", (MARC.Everest.Interfaces.IGraphable)instance.AttachmentText, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.ED>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Receiver != null && !isInstanceNull) {

foreach(MARC.Everest.Interfaces.IGraphable ig in instance.Receiver) { retVal = Host.WriteElementUtil(s, "receiver", ig, typeof(MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Receiver), context, resultContext); }
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.RespondTo != null && !isInstanceNull) {

foreach(MARC.Everest.Interfaces.IGraphable ig in instance.RespondTo) { retVal = Host.WriteElementUtil(s, "respondTo", ig, typeof(MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.RespondTo), context, resultContext); }
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Sender != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "sender", (MARC.Everest.Interfaces.IGraphable)instance.Sender, typeof(MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Sender), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.AttentionLine != null && !isInstanceNull) {

foreach(MARC.Everest.Interfaces.IGraphable ig in instance.AttentionLine) { retVal = Host.WriteElementUtil(s, "attentionLine", ig, typeof(MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.AttentionLine), context, resultContext); }
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.Acknowledgement != null && !isInstanceNull) {

foreach(MARC.Everest.Interfaces.IGraphable ig in instance.Acknowledgement) { retVal = Host.WriteElementUtil(s, "acknowledgement", ig, typeof(MARC.Everest.RMIM.UV.NE2008.MCCI_MT100300UV01.Acknowledgement), context, resultContext); }
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
if(instance.controlActProcess != null && !isInstanceNull) {

			retVal = Host.WriteElementUtil(s, "controlActProcess", (MARC.Everest.Interfaces.IGraphable)instance.controlActProcess, typeof(MARC.Everest.RMIM.UV.NE2008.MFMI_MT700711UV01.ControlActProcess<MARC.Everest.RMIM.UV.NE2008.PRPA_MT201306UV02.QueryByParameter,MARC.Everest.RMIM.UV.NE2008.PRPA_MT201310UV02.Patient,System.Object>), context, resultContext);
			if(resultContext.Code != MARC.Everest.Connectors.ResultCode.Accepted) retVal = resultContext.Code;
}
			if(isEntryPoint) s.WriteEndElement();
			return retVal;
		}
コード例 #23
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual bool Validate(MARC.Everest.Interfaces.IGraphable o, string location, out MARC.Everest.Connectors.IResultDetail[] outDetails) {
			MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Agent instance = o as MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Agent;;
			outDetails = new MARC.Everest.Connectors.IResultDetail[0]; System.Collections.Generic.List<MARC.Everest.Connectors.IResultDetail> details = new System.Collections.Generic.List<MARC.Everest.Connectors.IResultDetail>(10);;
			bool isValid = true;;
			if(instance == null && o != null) throw new System.NullReferenceException(System.String.Format("Could not cast type '{0}' to 'MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Agent'!", o.GetType().FullName));if(instance == null || instance.NullFlavor != null) return true;if(instance.ClassCode == null || instance.ClassCode.NullFlavor != null) { isValid &= false; details.Add(new MARC.Everest.Connectors.MandatoryElementMissingResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, "Property ClassCode in MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.Agent is marked mandatory and is either not assigned, or is assigned a null flavor. This is not permitted.", location));  } 
;
			outDetails = details.ToArray();;
			return isValid;;
		}
コード例 #24
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual object Parse(System.Xml.XmlReader s, System.Type useType, System.Type currentInteractionType, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterParseResult resultContext) {
			System.String nil = s.GetAttribute("nil", MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(!System.String.IsNullOrEmpty(nil) && System.Convert.ToBoolean(nil)) return null;;
			MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.Place instance = new MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.Place();;
			if(s.NodeType != System.Xml.XmlNodeType.Element) throw new System.InvalidOperationException(System.String.Format("Expected node type of Element, actual node type is '{0}'", s.NodeType));
if(s.GetAttribute("classCode") != null){ if(!"PLC".Equals(s.GetAttribute("classCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("classCode"), "PLC", false, s.ToString()));  instance.ClassCode = (MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.EntityClass>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("classCode"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.EntityClass>)); }
if(s.GetAttribute("determinerCode") != null){ if(!"INSTANCE".Equals(s.GetAttribute("determinerCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("determinerCode"), "INSTANCE", false, s.ToString()));  instance.DeterminerCode = (MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.EntityDeterminer>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("determinerCode"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.EntityDeterminer>)); }
			if(s.GetAttribute("nullFlavor") != null) instance.NullFlavor = (MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("nullFlavor"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>));
			if(s.IsEmptyElement) return instance;
string sName = s.Name;
int sDepth = s.Depth;
s.Read();
while(!(s.NodeType == System.Xml.XmlNodeType.EndElement && s.Name == sName && s.Depth == sDepth)) {
string oldName = s.LocalName; 
 try { if(s.NodeType == System.Xml.XmlNodeType.Element) { 
 if(s.LocalName == "id" ) {

			object d6ef498db27d94d23a18de04f005b3ddd = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.Id = d6ef498db27d94d23a18de04f005b3ddd is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II> ? d6ef498db27d94d23a18de04f005b3ddd as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(d6ef498db27d94d23a18de04f005b3ddd, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>));
}
else if(s.LocalName == "code" ) {

			object d781cf7f139d04be0bea871dd5f752bb1 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.CE<System.String>), currentInteractionType, resultContext); instance.Code = d781cf7f139d04be0bea871dd5f752bb1 is MARC.Everest.DataTypes.CE<System.String> ? d781cf7f139d04be0bea871dd5f752bb1 as MARC.Everest.DataTypes.CE<System.String> : (MARC.Everest.DataTypes.CE<System.String>)MARC.Everest.Connectors.Util.FromWireFormat(d781cf7f139d04be0bea871dd5f752bb1, typeof(MARC.Everest.DataTypes.CE<System.String>));
}
else if(s.LocalName == "name" ) {

			object d4235c35d5b0f4756a0a08cd42234a62f = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.EN>), currentInteractionType, resultContext); instance.Name = d4235c35d5b0f4756a0a08cd42234a62f is MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.EN> ? d4235c35d5b0f4756a0a08cd42234a62f as MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.EN> : (MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.EN>)MARC.Everest.Connectors.Util.FromWireFormat(d4235c35d5b0f4756a0a08cd42234a62f, typeof(MARC.Everest.DataTypes.BAG<MARC.Everest.DataTypes.EN>));
}
else if(s.LocalName == "desc" ) {

			object dd104c61bad5c4b4ba9dcffec4b6bb735 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.ED), currentInteractionType, resultContext); instance.Desc = dd104c61bad5c4b4ba9dcffec4b6bb735 is MARC.Everest.DataTypes.ED ? dd104c61bad5c4b4ba9dcffec4b6bb735 as MARC.Everest.DataTypes.ED : (MARC.Everest.DataTypes.ED)MARC.Everest.Connectors.Util.FromWireFormat(dd104c61bad5c4b4ba9dcffec4b6bb735, typeof(MARC.Everest.DataTypes.ED));
}
else if(s.LocalName == "directionsText" ) {

			object d18d4dee30f6d4524a1b20625a774420a = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.ED), currentInteractionType, resultContext); instance.DirectionsText = d18d4dee30f6d4524a1b20625a774420a is MARC.Everest.DataTypes.ED ? d18d4dee30f6d4524a1b20625a774420a as MARC.Everest.DataTypes.ED : (MARC.Everest.DataTypes.ED)MARC.Everest.Connectors.Util.FromWireFormat(d18d4dee30f6d4524a1b20625a774420a, typeof(MARC.Everest.DataTypes.ED));
}
else if(s.LocalName == "positionText" ) {

			object d348cb2d4936344c69ae290cc71d25e8b = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.ED), currentInteractionType, resultContext); instance.PositionText = d348cb2d4936344c69ae290cc71d25e8b is MARC.Everest.DataTypes.ED ? d348cb2d4936344c69ae290cc71d25e8b as MARC.Everest.DataTypes.ED : (MARC.Everest.DataTypes.ED)MARC.Everest.Connectors.Util.FromWireFormat(d348cb2d4936344c69ae290cc71d25e8b, typeof(MARC.Everest.DataTypes.ED));
}
else if(s.LocalName == "gpsText" ) {

			object dd549c9e406cb452dbe184d60cff9dfe1 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.ST), currentInteractionType, resultContext); instance.GpsText = dd549c9e406cb452dbe184d60cff9dfe1 is MARC.Everest.DataTypes.ST ? dd549c9e406cb452dbe184d60cff9dfe1 as MARC.Everest.DataTypes.ST : (MARC.Everest.DataTypes.ST)MARC.Everest.Connectors.Util.FromWireFormat(dd549c9e406cb452dbe184d60cff9dfe1, typeof(MARC.Everest.DataTypes.ST));
}
else if(s.LocalName == "asLocatedEntityPartOf" ) {

			object d83c8f6a04e0e40dbaf7f059bec9386c7 = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.LocatedEntityPartOf), currentInteractionType, resultContext); instance.AsLocatedEntityPartOf.Add(d83c8f6a04e0e40dbaf7f059bec9386c7 is MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.LocatedEntityPartOf ? (MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.LocatedEntityPartOf)d83c8f6a04e0e40dbaf7f059bec9386c7 : (MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.LocatedEntityPartOf)MARC.Everest.Connectors.Util.FromWireFormat(d83c8f6a04e0e40dbaf7f059bec9386c7, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.LocatedEntityPartOf)));
}
else if(s.LocalName == "locatedEntityHasParts" ) {

			object d415113a2a15c4536a600599f927586f2 = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.LocatedEntityHasParts), currentInteractionType, resultContext); instance.LocatedEntityHasParts.Add(d415113a2a15c4536a600599f927586f2 is MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.LocatedEntityHasParts ? (MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.LocatedEntityHasParts)d415113a2a15c4536a600599f927586f2 : (MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.LocatedEntityHasParts)MARC.Everest.Connectors.Util.FromWireFormat(d415113a2a15c4536a600599f927586f2, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT710000UV01.LocatedEntityHasParts)));
}
else if(s.LocalName == "realmCode" ) {

			object de12da0f9a7424f18bcc1a56b0c444d8d = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), currentInteractionType, resultContext); instance.RealmCode = de12da0f9a7424f18bcc1a56b0c444d8d is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> ? de12da0f9a7424f18bcc1a56b0c444d8d as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>)MARC.Everest.Connectors.Util.FromWireFormat(de12da0f9a7424f18bcc1a56b0c444d8d, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>));
}
else if(s.LocalName == "typeId" ) {

			object dacfac6b041fd4ce4b4a10d8c26e6ef94 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.II), currentInteractionType, resultContext); instance.TypeId = dacfac6b041fd4ce4b4a10d8c26e6ef94 is MARC.Everest.DataTypes.II ? dacfac6b041fd4ce4b4a10d8c26e6ef94 as MARC.Everest.DataTypes.II : (MARC.Everest.DataTypes.II)MARC.Everest.Connectors.Util.FromWireFormat(dacfac6b041fd4ce4b4a10d8c26e6ef94, typeof(MARC.Everest.DataTypes.II));
}
else if(s.LocalName == "templateId" ) {

			object da39ceea97e37472f9e31dbec3859d21c = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.TemplateId = da39ceea97e37472f9e31dbec3859d21c is MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> ? da39ceea97e37472f9e31dbec3859d21c as MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(da39ceea97e37472f9e31dbec3859d21c, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>));
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotImplementedElementResultDetail(MARC.Everest.Connectors.ResultDetailType.Warning, s.LocalName, s.NamespaceURI, s.ToString(), null)); }
}
}
catch (System.Exception e) { resultContext.AddResultDetail(new MARC.Everest.Connectors.ResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, e.Message, s.ToString(), e)); }
finally { if(oldName.Equals(s.LocalName)) s.Read(); } }
			return instance;
		}
コード例 #25
0
ファイル: MemoryConnector.cs プロジェクト: oneminot/everest
    /// <summary>
    /// Asynchronous send operation
    /// </summary>
    /// <param name="data">The data being sent</param>
    /// <param name="callback">A callback to execute when the method is complete</param>
    /// <param name="state">A user state</param>
    /// <returns>An IAsyncResult representing the asynchronous operation</returns>
    public IAsyncResult BeginSend(MARC.Everest.Interfaces.IGraphable data, AsyncCallback callback, object state)
    {

        // Good practice to check if the connector is open
        if (!IsOpen())
            throw new ConnectorException(ConnectorException.MSG_INVALID_STATE, ConnectorException.ReasonType.NotOpen, null);

        // Create a new worker
        Worker w = new Worker();

        // Always clone the current formatter
        w.Formatter = (IStructureFormatter)Formatter.Clone();

        // Create the async result
        IAsyncResult result = new SendResultAsyncResult(state, new AutoResetEvent(false));

        // Set the callback
        w.Completed +=  new WaitCallback(delegate(object sender)
        {
            Worker sWorker = sender as Worker; 

            // Set the result in the dictionary
            lock (this.results)
                this.results.Add(result, sWorker.Result);

            // Notify any listeners
            (result.AsyncWaitHandle as AutoResetEvent).Set();
            if (callback != null) callback(result);
        });

        // Execute
        ThreadPool.QueueUserWorkItem(w.Work, data);

        return result;
    }
コード例 #26
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual object Parse(System.Xml.XmlReader s, System.Type useType, System.Type currentInteractionType, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterParseResult resultContext) {
			System.String nil = s.GetAttribute("nil", MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(!System.String.IsNullOrEmpty(nil) && System.Convert.ToBoolean(nil)) return null;;
			MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Support instance = new MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Support();;
			if(s.NodeType != System.Xml.XmlNodeType.Element) throw new System.InvalidOperationException(System.String.Format("Expected node type of Element, actual node type is '{0}'", s.NodeType));
if(s.GetAttribute("typeCode") != null){ if(!"SPRT".Equals(s.GetAttribute("typeCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("typeCode"), "SPRT", false, s.ToString()));  instance.TypeCode = (MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ActRelationshipType>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("typeCode"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ActRelationshipType>)); }
			if(s.GetAttribute("nullFlavor") != null) instance.NullFlavor = (MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("nullFlavor"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>));
			if(s.IsEmptyElement) return instance;
string sName = s.Name;
int sDepth = s.Depth;
s.Read();
while(!(s.NodeType == System.Xml.XmlNodeType.EndElement && s.Name == sName && s.Depth == sDepth)) {
string oldName = s.LocalName; 
 try { if(s.NodeType == System.Xml.XmlNodeType.Element) { 
 if(s.LocalName == "informationProvision" ) {

			object dca0665df19904e02bd212d5d3d36e4bc = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.InformationProvision), currentInteractionType, resultContext); instance.InformationProvision = dca0665df19904e02bd212d5d3d36e4bc is MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.InformationProvision ? dca0665df19904e02bd212d5d3d36e4bc as MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.InformationProvision : (MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.InformationProvision)MARC.Everest.Connectors.Util.FromWireFormat(dca0665df19904e02bd212d5d3d36e4bc, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.InformationProvision));
}
else if(s.LocalName == "realmCode" ) {

			object d751912425dec41aca15a5079f0b8e76b = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), currentInteractionType, resultContext); instance.RealmCode = d751912425dec41aca15a5079f0b8e76b is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> ? d751912425dec41aca15a5079f0b8e76b as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>)MARC.Everest.Connectors.Util.FromWireFormat(d751912425dec41aca15a5079f0b8e76b, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>));
}
else if(s.LocalName == "typeId" ) {

			object d65574972a18441198604e67ead5cade3 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.II), currentInteractionType, resultContext); instance.TypeId = d65574972a18441198604e67ead5cade3 is MARC.Everest.DataTypes.II ? d65574972a18441198604e67ead5cade3 as MARC.Everest.DataTypes.II : (MARC.Everest.DataTypes.II)MARC.Everest.Connectors.Util.FromWireFormat(d65574972a18441198604e67ead5cade3, typeof(MARC.Everest.DataTypes.II));
}
else if(s.LocalName == "templateId" ) {

			object daedcc6acede04936bf5c886dfd0d38bd = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.TemplateId = daedcc6acede04936bf5c886dfd0d38bd is MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> ? daedcc6acede04936bf5c886dfd0d38bd as MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(daedcc6acede04936bf5c886dfd0d38bd, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>));
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotImplementedElementResultDetail(MARC.Everest.Connectors.ResultDetailType.Warning, s.LocalName, s.NamespaceURI, s.ToString(), null)); }
}
}
catch (System.Exception e) { resultContext.AddResultDetail(new MARC.Everest.Connectors.ResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, e.Message, s.ToString(), e)); }
finally { if(oldName.Equals(s.LocalName)) s.Read(); } }
			return instance;
		}
コード例 #27
0
        /// <summary>
        /// Send a response back to the remote endpoint.
        /// </summary>
        /// <param name="data">The data to send back.</param>
        /// <param name="correlate">The result to correlate this response with.</param>
        /// <returns>A send result structure that details the result of the send operation.</returns>
        public ISendResult Send(MARC.Everest.Interfaces.IGraphable data, IReceiveResult correlate)
        {

            if (!IsOpen())
                throw new ConnectorException(ConnectorException.MSG_INVALID_STATE, ConnectorException.ReasonType.NotOpen);

            Worker w = new Worker();
            var cresult = correlate as WcfReceiveResult;
            w.MessageId = cresult.MessageIdentifier;
            w.MessageVersion = cresult.MessageVersion; // Prepare
            w.Formatter = (IXmlStructureFormatter)Formatter;
            w.ResponseHeaders = cresult.ResponseHeaders;
            w.InvalidResponse = InvalidResponse;

            w.WorkSend(data); // Work

            // Publish so WCF connector can send a result
            lock (results)
                results.Add(w.MessageId, w.SendResult);

            // Notify
            PublishResult(w.MessageId);

            // Return result
            return w.SendResult;
        }
コード例 #28
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual object Parse(System.Xml.XmlReader s, System.Type useType, System.Type currentInteractionType, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterParseResult resultContext) {
			System.String nil = s.GetAttribute("nil", MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(!System.String.IsNullOrEmpty(nil) && System.Convert.ToBoolean(nil)) return null;;
			MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Performer instance = new MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.Performer();;
			if(s.NodeType != System.Xml.XmlNodeType.Element) throw new System.InvalidOperationException(System.String.Format("Expected node type of Element, actual node type is '{0}'", s.NodeType));
if(s.GetAttribute("typeCode") != null){ if(!"PRF".Equals(s.GetAttribute("typeCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("typeCode"), "PRF", false, s.ToString()));  instance.TypeCode = (MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ParticipationType>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("typeCode"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ParticipationType>)); }
			if(s.GetAttribute("nullFlavor") != null) instance.NullFlavor = (MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("nullFlavor"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>));
			if(s.IsEmptyElement) return instance;
string sName = s.Name;
int sDepth = s.Depth;
s.Read();
while(!(s.NodeType == System.Xml.XmlNodeType.EndElement && s.Name == sName && s.Depth == sDepth)) {
string oldName = s.LocalName; 
 try { if(s.NodeType == System.Xml.XmlNodeType.Element) { 
 if(s.LocalName == "responsible" ) {

			object d279b1ab73ea14b42808abf8aa9af20ba = Host.ParseObject(s, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT040008UV.Responsible), currentInteractionType, resultContext); instance.Responsible = d279b1ab73ea14b42808abf8aa9af20ba is MARC.Everest.RMIM.UV.NE2008.COCT_MT040008UV.Responsible ? d279b1ab73ea14b42808abf8aa9af20ba as MARC.Everest.RMIM.UV.NE2008.COCT_MT040008UV.Responsible : (MARC.Everest.RMIM.UV.NE2008.COCT_MT040008UV.Responsible)MARC.Everest.Connectors.Util.FromWireFormat(d279b1ab73ea14b42808abf8aa9af20ba, typeof(MARC.Everest.RMIM.UV.NE2008.COCT_MT040008UV.Responsible));
}
else if(s.LocalName == "realmCode" ) {

			object de2cf2928112c4c3e8febd520fdc49302 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), currentInteractionType, resultContext); instance.RealmCode = de2cf2928112c4c3e8febd520fdc49302 is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> ? de2cf2928112c4c3e8febd520fdc49302 as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>)MARC.Everest.Connectors.Util.FromWireFormat(de2cf2928112c4c3e8febd520fdc49302, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>));
}
else if(s.LocalName == "typeId" ) {

			object d811ef0c824824e47bf339752dfaa6f6b = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.II), currentInteractionType, resultContext); instance.TypeId = d811ef0c824824e47bf339752dfaa6f6b is MARC.Everest.DataTypes.II ? d811ef0c824824e47bf339752dfaa6f6b as MARC.Everest.DataTypes.II : (MARC.Everest.DataTypes.II)MARC.Everest.Connectors.Util.FromWireFormat(d811ef0c824824e47bf339752dfaa6f6b, typeof(MARC.Everest.DataTypes.II));
}
else if(s.LocalName == "templateId" ) {

			object df4a62caaa7e94d2fa73de9622a5ec5f3 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.TemplateId = df4a62caaa7e94d2fa73de9622a5ec5f3 is MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> ? df4a62caaa7e94d2fa73de9622a5ec5f3 as MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(df4a62caaa7e94d2fa73de9622a5ec5f3, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>));
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotImplementedElementResultDetail(MARC.Everest.Connectors.ResultDetailType.Warning, s.LocalName, s.NamespaceURI, s.ToString(), null)); }
}
}
catch (System.Exception e) { resultContext.AddResultDetail(new MARC.Everest.Connectors.ResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, e.Message, s.ToString(), e)); }
finally { if(oldName.Equals(s.LocalName)) s.Read(); } }
			return instance;
		}
コード例 #29
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual object Parse(System.Xml.XmlReader s, System.Type useType, System.Type currentInteractionType, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterParseResult resultContext) {
			System.String nil = s.GetAttribute("nil", MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(!System.String.IsNullOrEmpty(nil) && System.Convert.ToBoolean(nil)) return null;;
			MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.VerificationRequest instance = new MARC.Everest.RMIM.UV.NE2008.COCT_MT810000UV.VerificationRequest();;
			if(s.NodeType != System.Xml.XmlNodeType.Element) throw new System.InvalidOperationException(System.String.Format("Expected node type of Element, actual node type is '{0}'", s.NodeType));
if(s.GetAttribute("classCode") != null){ if(!"OBS".Equals(s.GetAttribute("classCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("classCode"), "OBS", false, s.ToString()));  instance.ClassCode = (MARC.Everest.DataTypes.CS<System.String>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("classCode"), typeof(MARC.Everest.DataTypes.CS<System.String>)); }
if(s.GetAttribute("moodCode") != null){ if(!"RQO".Equals(s.GetAttribute("moodCode"))) resultContext.AddResultDetail(new MARC.Everest.Connectors.FixedValueMisMatchedResultDetail(s.GetAttribute("moodCode"), "RQO", false, s.ToString()));  instance.MoodCode = (MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ActMood>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("moodCode"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.RMIM.UV.NE2008.Vocabulary.ActMood>)); }
			if(s.GetAttribute("nullFlavor") != null) instance.NullFlavor = (MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("nullFlavor"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>));
			if(s.IsEmptyElement) return instance;
string sName = s.Name;
int sDepth = s.Depth;
s.Read();
while(!(s.NodeType == System.Xml.XmlNodeType.EndElement && s.Name == sName && s.Depth == sDepth)) {
string oldName = s.LocalName; 
 try { if(s.NodeType == System.Xml.XmlNodeType.Element) { 
 if(s.LocalName == "id" ) {

			object db5e82a8238e0493a9c21a7decb245045 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.Id = db5e82a8238e0493a9c21a7decb245045 is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II> ? db5e82a8238e0493a9c21a7decb245045 as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(db5e82a8238e0493a9c21a7decb245045, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.II>));
}
else if(s.LocalName == "realmCode" ) {

			object dc09c7be05f0345e68e270bcfea918be9 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), currentInteractionType, resultContext); instance.RealmCode = dc09c7be05f0345e68e270bcfea918be9 is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> ? dc09c7be05f0345e68e270bcfea918be9 as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>)MARC.Everest.Connectors.Util.FromWireFormat(dc09c7be05f0345e68e270bcfea918be9, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>));
}
else if(s.LocalName == "typeId" ) {

			object d8532709f8ff64a13ab0a94f5fca30527 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.II), currentInteractionType, resultContext); instance.TypeId = d8532709f8ff64a13ab0a94f5fca30527 is MARC.Everest.DataTypes.II ? d8532709f8ff64a13ab0a94f5fca30527 as MARC.Everest.DataTypes.II : (MARC.Everest.DataTypes.II)MARC.Everest.Connectors.Util.FromWireFormat(d8532709f8ff64a13ab0a94f5fca30527, typeof(MARC.Everest.DataTypes.II));
}
else if(s.LocalName == "templateId" ) {

			object dfd6661adb51f49c49da3c8142d3b081a = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.TemplateId = dfd6661adb51f49c49da3c8142d3b081a is MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> ? dfd6661adb51f49c49da3c8142d3b081a as MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(dfd6661adb51f49c49da3c8142d3b081a, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>));
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotImplementedElementResultDetail(MARC.Everest.Connectors.ResultDetailType.Warning, s.LocalName, s.NamespaceURI, s.ToString(), null)); }
}
}
catch (System.Exception e) { resultContext.AddResultDetail(new MARC.Everest.Connectors.ResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, e.Message, s.ToString(), e)); }
finally { if(oldName.Equals(s.LocalName)) s.Read(); } }
			return instance;
		}
コード例 #30
0
ファイル: NE2008Helper.cs プロジェクト: oneminot/everest
		public virtual object Parse(System.Xml.XmlReader s, System.Type useType, System.Type currentInteractionType, MARC.Everest.Formatters.XML.ITS1.XmlIts1FormatterParseResult resultContext) {
			System.String nil = s.GetAttribute("nil", MARC.Everest.Formatters.XML.ITS1.XmlIts1Formatter.NS_XSI);
			if(!System.String.IsNullOrEmpty(nil) && System.Convert.ToBoolean(nil)) return null;;
			MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.AttentionLine instance = new MARC.Everest.RMIM.UV.NE2008.MCCI_MT100200UV01.AttentionLine();;
			if(s.NodeType != System.Xml.XmlNodeType.Element) throw new System.InvalidOperationException(System.String.Format("Expected node type of Element, actual node type is '{0}'", s.NodeType));
			if(s.GetAttribute("nullFlavor") != null) instance.NullFlavor = (MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>)MARC.Everest.Connectors.Util.FromWireFormat(s.GetAttribute("nullFlavor"), typeof(MARC.Everest.DataTypes.CS<MARC.Everest.DataTypes.NullFlavor>));
			if(s.IsEmptyElement) return instance;
string sName = s.Name;
int sDepth = s.Depth;
s.Read();
while(!(s.NodeType == System.Xml.XmlNodeType.EndElement && s.Name == sName && s.Depth == sDepth)) {
string oldName = s.LocalName; 
 try { if(s.NodeType == System.Xml.XmlNodeType.Element) { 
 if(s.LocalName == "keyWordText" ) {

			object d154b09d1ce5b4708a668cbe61609e2bb = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SC), currentInteractionType, resultContext); instance.KeyWordText = d154b09d1ce5b4708a668cbe61609e2bb is MARC.Everest.DataTypes.SC ? d154b09d1ce5b4708a668cbe61609e2bb as MARC.Everest.DataTypes.SC : (MARC.Everest.DataTypes.SC)MARC.Everest.Connectors.Util.FromWireFormat(d154b09d1ce5b4708a668cbe61609e2bb, typeof(MARC.Everest.DataTypes.SC));
}
else if(s.LocalName == "value" ) {

			object d40fe5a82cee94e66a0d9ae9151f75abf = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.ANY), currentInteractionType, resultContext); instance.Value = d40fe5a82cee94e66a0d9ae9151f75abf is MARC.Everest.DataTypes.ANY ? d40fe5a82cee94e66a0d9ae9151f75abf as MARC.Everest.DataTypes.ANY : (MARC.Everest.DataTypes.ANY)MARC.Everest.Connectors.Util.FromWireFormat(d40fe5a82cee94e66a0d9ae9151f75abf, typeof(MARC.Everest.DataTypes.ANY));
}
else if(s.LocalName == "realmCode" ) {

			object d979cdadc0a7f4432b376211a7f8d182d = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>), currentInteractionType, resultContext); instance.RealmCode = d979cdadc0a7f4432b376211a7f8d182d is MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> ? d979cdadc0a7f4432b376211a7f8d182d as MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>> : (MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>)MARC.Everest.Connectors.Util.FromWireFormat(d979cdadc0a7f4432b376211a7f8d182d, typeof(MARC.Everest.DataTypes.SET<MARC.Everest.DataTypes.CS<System.String>>));
}
else if(s.LocalName == "typeId" ) {

			object d3a73f2be074f4312be4ebb4db1e81115 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.II), currentInteractionType, resultContext); instance.TypeId = d3a73f2be074f4312be4ebb4db1e81115 is MARC.Everest.DataTypes.II ? d3a73f2be074f4312be4ebb4db1e81115 as MARC.Everest.DataTypes.II : (MARC.Everest.DataTypes.II)MARC.Everest.Connectors.Util.FromWireFormat(d3a73f2be074f4312be4ebb4db1e81115, typeof(MARC.Everest.DataTypes.II));
}
else if(s.LocalName == "templateId" ) {

			object d74b30a3f41bc494d8322bd0ba3645ac1 = Host.ParseObject(s, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>), currentInteractionType, resultContext); instance.TemplateId = d74b30a3f41bc494d8322bd0ba3645ac1 is MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> ? d74b30a3f41bc494d8322bd0ba3645ac1 as MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II> : (MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>)MARC.Everest.Connectors.Util.FromWireFormat(d74b30a3f41bc494d8322bd0ba3645ac1, typeof(MARC.Everest.DataTypes.LIST<MARC.Everest.DataTypes.II>));
}
else { resultContext.AddResultDetail(new MARC.Everest.Connectors.NotImplementedElementResultDetail(MARC.Everest.Connectors.ResultDetailType.Warning, s.LocalName, s.NamespaceURI, s.ToString(), null)); }
}
}
catch (System.Exception e) { resultContext.AddResultDetail(new MARC.Everest.Connectors.ResultDetail(MARC.Everest.Connectors.ResultDetailType.Error, e.Message, s.ToString(), e)); }
finally { if(oldName.Equals(s.LocalName)) s.Read(); } }
			return instance;
		}