private void LoadStateFromXML(string sFile) { try { XElement xDocs = XElement.Load(sFile); oFeeds = new Feeds(xDocs.Descendants("Feeds").First()); foreach (Feed oFeed in oFeeds) { lvwFeeds.Items.Add(new ListViewItem(new[] { oFeed.Address })); } oDocs = new Documents(xDocs.Descendants("Documents").First()); foreach (Document oDoc in oDocs.OrderBy(x => x.Title)) { lvwDownloadLinks.Items.Add(new ListViewItem(new[] { oDoc.Title, oDoc.Status.ToString() })); } oReps = new Replaces(xDocs.Descendants("Replaces").First()); ListViewItem oItem; foreach (Replace oRep in oReps.OrderBy(x => x.ThisValue)) { oItem = new ListViewItem(new[] { oRep.ThisValue, oRep.WithThis }); oItem.Tag = oRep; lswReplaces.Items.Add(oItem); } } catch (Exception err) { MessageBox.Show(err.Message + Environment.NewLine); oDocs = new Documents(); } }
private void LoadReplaces() { var data = File.ReadAllLines(Path.Combine(DictionaryPath, FileNames.Replaces)); foreach (var s in data) { var line = s.Trim(); if (line.StartsWith("#") || line.StartsWith("//") || !line.Contains("#;")) { continue; } var kv = line.Split(new[] { "#;" }, StringSplitOptions.None); Replaces.Add(kv[0].ToUpperInvariant(), kv[1]); } }
public void Populate(ManifestMetadata manifestMetadata) { IPackageMetadata metadata = manifestMetadata; Id = metadata.Id; Version = metadata.Version; Title = metadata.Title; Authors.AddRange(metadata.Authors); Owners.AddRange(metadata.Owners); IconUrl = metadata.IconUrl; LicenseUrl = metadata.LicenseUrl; ProjectUrl = metadata.ProjectUrl; RequireLicenseAcceptance = metadata.RequireLicenseAcceptance; DevelopmentDependency = metadata.DevelopmentDependency; Description = metadata.Description; Summary = metadata.Summary; ReleaseNotes = metadata.ReleaseNotes; Language = metadata.Language; Copyright = metadata.Copyright; MinClientVersion = metadata.MinClientVersion; ContentFiles = new Collection <ManifestContentFiles>(manifestMetadata.ContentFiles); ProjectSourceUrl = metadata.ProjectSourceUrl; PackageSourceUrl = metadata.PackageSourceUrl; DocsUrl = metadata.DocsUrl; WikiUrl = metadata.WikiUrl; MailingListUrl = metadata.MailingListUrl; BugTrackerUrl = metadata.BugTrackerUrl; Replaces.AddRange(metadata.Replaces); Provides.AddRange(metadata.Provides); Conflicts.AddRange(metadata.Conflicts); SoftwareDisplayName = metadata.SoftwareDisplayName; SoftwareDisplayVersion = metadata.SoftwareDisplayVersion; if (metadata.Tags != null) { Tags.AddRange(ParseTags(metadata.Tags)); } DependencySets.AddRange(metadata.DependencySets); FrameworkReferences.AddRange(metadata.FrameworkAssemblies); if (manifestMetadata.ReferenceSets != null) { PackageAssemblyReferences.AddRange(manifestMetadata.ReferenceSets.Select(r => new PackageReferenceSet(r))); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as CommunicationRequest; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (Replaces != null) { dest.Replaces = new List <Hl7.Fhir.Model.ResourceReference>(Replaces.DeepCopy()); } if (GroupIdentifier != null) { dest.GroupIdentifier = (Hl7.Fhir.Model.Identifier)GroupIdentifier.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.RequestStatus>)StatusElement.DeepCopy(); } if (Category != null) { dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy()); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.RequestPriority>)PriorityElement.DeepCopy(); } if (Medium != null) { dest.Medium = new List <Hl7.Fhir.Model.CodeableConcept>(Medium.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Recipient != null) { dest.Recipient = new List <Hl7.Fhir.Model.ResourceReference>(Recipient.DeepCopy()); } if (Topic != null) { dest.Topic = new List <Hl7.Fhir.Model.ResourceReference>(Topic.DeepCopy()); } if (Context != null) { dest.Context = (Hl7.Fhir.Model.ResourceReference)Context.DeepCopy(); } if (Payload != null) { dest.Payload = new List <Hl7.Fhir.Model.CommunicationRequest.PayloadComponent>(Payload.DeepCopy()); } if (Occurrence != null) { dest.Occurrence = (Hl7.Fhir.Model.Element)Occurrence.DeepCopy(); } if (AuthoredOnElement != null) { dest.AuthoredOnElement = (Hl7.Fhir.Model.FhirDateTime)AuthoredOnElement.DeepCopy(); } if (Sender != null) { dest.Sender = (Hl7.Fhir.Model.ResourceReference)Sender.DeepCopy(); } if (Requester != null) { dest.Requester = (Hl7.Fhir.Model.CommunicationRequest.RequesterComponent)Requester.DeepCopy(); } if (ReasonCode != null) { dest.ReasonCode = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonCode.DeepCopy()); } if (ReasonReference != null) { dest.ReasonReference = new List <Hl7.Fhir.Model.ResourceReference>(ReasonReference.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as ReferralRequest; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Definition != null) { dest.Definition = new List <Hl7.Fhir.Model.ResourceReference>(Definition.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (Replaces != null) { dest.Replaces = new List <Hl7.Fhir.Model.ResourceReference>(Replaces.DeepCopy()); } if (GroupIdentifier != null) { dest.GroupIdentifier = (Hl7.Fhir.Model.Identifier)GroupIdentifier.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.RequestStatus>)StatusElement.DeepCopy(); } if (IntentElement != null) { dest.IntentElement = (Code <Hl7.Fhir.Model.RequestIntent>)IntentElement.DeepCopy(); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.RequestPriority>)PriorityElement.DeepCopy(); } if (ServiceRequested != null) { dest.ServiceRequested = new List <Hl7.Fhir.Model.CodeableConcept>(ServiceRequested.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Context != null) { dest.Context = (Hl7.Fhir.Model.ResourceReference)Context.DeepCopy(); } if (Occurrence != null) { dest.Occurrence = (Hl7.Fhir.Model.Element)Occurrence.DeepCopy(); } if (AuthoredOnElement != null) { dest.AuthoredOnElement = (Hl7.Fhir.Model.FhirDateTime)AuthoredOnElement.DeepCopy(); } if (Requester != null) { dest.Requester = (Hl7.Fhir.Model.ReferralRequest.RequesterComponent)Requester.DeepCopy(); } if (Specialty != null) { dest.Specialty = (Hl7.Fhir.Model.CodeableConcept)Specialty.DeepCopy(); } if (Recipient != null) { dest.Recipient = new List <Hl7.Fhir.Model.ResourceReference>(Recipient.DeepCopy()); } if (ReasonCode != null) { dest.ReasonCode = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonCode.DeepCopy()); } if (ReasonReference != null) { dest.ReasonReference = new List <Hl7.Fhir.Model.ResourceReference>(ReasonReference.DeepCopy()); } if (DescriptionElement != null) { dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy(); } if (SupportingInfo != null) { dest.SupportingInfo = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInfo.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } if (RelevantHistory != null) { dest.RelevantHistory = new List <Hl7.Fhir.Model.ResourceReference>(RelevantHistory.DeepCopy()); } return(dest); }
public PlayFairRu56() { Replaces.Add('ё', 'е'); Replaces.Add('й', 'и'); Replaces.Add('ъ', 'ь'); }
//Возвращает символ после всех преобразований //Если символ не принадлежит алфавиту, будет поставлен Replacer. public char GetChar(char Char) { Char = char.ToLower(Char); Char = Replaces.ContainsKey(Char) ? Replaces[Char] : Char; return(HsAlphabet.Contains(Char) ? Char : Replacer); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as ProcedureRequest; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Definition != null) { dest.Definition = new List <Hl7.Fhir.Model.ResourceReference>(Definition.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (Replaces != null) { dest.Replaces = new List <Hl7.Fhir.Model.ResourceReference>(Replaces.DeepCopy()); } if (Requisition != null) { dest.Requisition = (Hl7.Fhir.Model.Identifier)Requisition.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.RequestStatus>)StatusElement.DeepCopy(); } if (IntentElement != null) { dest.IntentElement = (Code <Hl7.Fhir.Model.RequestIntent>)IntentElement.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.RequestPriority>)PriorityElement.DeepCopy(); } if (DoNotPerformElement != null) { dest.DoNotPerformElement = (Hl7.Fhir.Model.FhirBoolean)DoNotPerformElement.DeepCopy(); } if (Category != null) { dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy()); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Context != null) { dest.Context = (Hl7.Fhir.Model.ResourceReference)Context.DeepCopy(); } if (Occurrence != null) { dest.Occurrence = (Hl7.Fhir.Model.DataType)Occurrence.DeepCopy(); } if (AsNeeded != null) { dest.AsNeeded = (Hl7.Fhir.Model.DataType)AsNeeded.DeepCopy(); } if (AuthoredOnElement != null) { dest.AuthoredOnElement = (Hl7.Fhir.Model.FhirDateTime)AuthoredOnElement.DeepCopy(); } if (Requester != null) { dest.Requester = (Hl7.Fhir.Model.ProcedureRequest.RequesterComponent)Requester.DeepCopy(); } if (PerformerType != null) { dest.PerformerType = (Hl7.Fhir.Model.CodeableConcept)PerformerType.DeepCopy(); } if (Performer != null) { dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy(); } if (ReasonCode != null) { dest.ReasonCode = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonCode.DeepCopy()); } if (ReasonReference != null) { dest.ReasonReference = new List <Hl7.Fhir.Model.ResourceReference>(ReasonReference.DeepCopy()); } if (SupportingInfo != null) { dest.SupportingInfo = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInfo.DeepCopy()); } if (Specimen != null) { dest.Specimen = new List <Hl7.Fhir.Model.ResourceReference>(Specimen.DeepCopy()); } if (BodySite != null) { dest.BodySite = new List <Hl7.Fhir.Model.CodeableConcept>(BodySite.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } if (RelevantHistory != null) { dest.RelevantHistory = new List <Hl7.Fhir.Model.ResourceReference>(RelevantHistory.DeepCopy()); } return(dest); }