public static void AddSystemInteraction( this CapabilityStatement capabilityStatement, CapabilityStatement.SystemRestfulInteraction code) { var interaction = new CapabilityStatement.SystemInteractionComponent { Code = code }; capabilityStatement.Rest().Interaction.Add(interaction); }
public static void AddSystemInteraction(this CapabilityStatement conformance, CapabilityStatement.SystemRestfulInteraction code) { var interaction = new CapabilityStatement.SystemInteractionComponent(); interaction.Code = code; conformance.Rest().Interaction.Add(interaction); }
public static ListedCapabilityStatement TryAddRestInteraction(this ListedCapabilityStatement statement, CapabilityStatement.SystemRestfulInteraction interaction) { EnsureArg.IsNotNull(statement, nameof(statement)); var restComponent = statement.Rest.Single(); if (restComponent.Interaction == null) { restComponent.Interaction = new List <CapabilityStatement.SystemInteractionComponent>(); } restComponent.Interaction.Add(new CapabilityStatement.SystemInteractionComponent { Code = interaction, }); return(statement); }