/// <summary> /// Initializes a new instance of the <see cref="XliffDocument"/> class. /// </summary> /// <param name="sourceLanguage">The language of the source text to translate.</param> public XliffDocument(string sourceLanguage) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); this.Files = new ParentAttachedList <File>(this); this.SourceLanguage = sourceLanguage; }
/// <summary> /// Initializes a new instance of the <see cref="Segment"/> class. /// </summary> /// <param name="id">The Id of the segment.</param> /// <param name="state">The translation state of the segment.</param> public Segment(string id, TranslationState state) : base(id) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.State = state; }
/// <summary> /// Initializes a new instance of the <see cref="Reference"/> class. /// </summary> /// <param name="href">An IRI referencing an external resource.</param> public Reference(string href) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); this.HRef = href; }
/// <summary> /// Initializes a new instance of the <see cref="ResourceData"/> class. /// </summary> public ResourceData() { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.ResourceItemReferences = new ParentAttachedList <ResourceItemRef>(this); this.ResourceItems = new ParentAttachedList <ResourceItem>(this); }
/// <summary> /// Initializes a new instance of the <see cref="Revision"/> class. /// </summary> public Revision() { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); this.Items = new ParentAttachedList <Item>(this); }
/// <summary> /// Initializes a new instance of the <see cref="ResourceItem"/> class. /// </summary> public ResourceItem() { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); this.References = new ParentAttachedList <Reference>(this); }
/// <summary> /// Initializes a new instance of the <see cref="Validation"/> class. /// </summary> public Validation() { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); this.Rules = new ParentAttachedList <Rule>(this); }
/// <summary> /// Initializes a new instance of the <see cref="Group"/> class. /// </summary> /// <param name="id">The Id of the group.</param> /// <param name="internalCtor">True if this internal constructor was called that is used for deserialization, /// false if the public one was called. /// </param> private Group(string id, bool internalCtor) : base(id, internalCtor) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.Containers = new ParentAttachedList <TranslationContainer>(this); }
/// <summary> /// Initializes a new instance of the <see cref="Translation"/> class. /// </summary> /// <param name="id">The Id of the translation.</param> public Translation(string id) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); this.Id = id; }
/// <summary> /// Initializes a new instance of the <see cref="Item"/> class. /// </summary> /// <param name="property">The type of revision data.</param> public Item(string property) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); this.Property = property; }
/// <summary> /// Initializes a new instance of the <see cref="ProfileData"/> class. /// </summary> /// <param name="profile">The normalization form to apply for general size restrictions.</param> public ProfileData(string profile) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); this.Profile = profile; }
/// <summary> /// Initializes a new instance of the <see cref="Match"/> class. /// </summary> /// <param name="sourceReference">The reference to to a span of source text within the same <see cref="Unit"/>, /// to which the translation candidate is relevant.</param> public Match(string sourceReference) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); this.SourceReference = sourceReference; }
/// <summary> /// Initializes a new instance of the <see cref="ResourceItemRef"/> class. /// </summary> /// <param name="reference">A reference to an associated <see cref="ResourceItem"/> element located at the /// <see cref="Localization.Xliff.OM.Core.File"/> level.</param> public ResourceItemRef(string reference) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); this.Reference = reference; }
/// <summary> /// Initializes a new instance of the <see cref="CodeBase"/> class. /// </summary> /// <param name="id">The Id of the span.</param> protected CodeBase(string id) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); this.Id = id; this.SubFormatStyle = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase); }
/// <summary> /// Initializes a new instance of the <see cref="RevisionsContainer"/> class. /// </summary> /// <param name="appliesTo">The specific XLIFF element which is a sibling, or a child of a sibling element, to /// the change track module within the scope of the enclosing element.</param> public RevisionsContainer(string appliesTo) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); this.AppliesTo = appliesTo; this.Revisions = new ParentAttachedList <Revision>(this); }
/// <summary> /// Initializes a new instance of the <see cref="Note"/> class. /// </summary> /// <param name="text">The text to put in the note.</param> public Note(string text) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); this.SubFormatStyle = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase); this.Text = text; }
/// <summary> /// Initializes a new instance of the <see cref="ContainerResource"/> class. /// </summary> /// <param name="id">The Id of the container.</param> protected ContainerResource(string id) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); if (id != null) { this.Id = id; } }
/// <summary> /// Initializes a new instance of the <see cref="Meta"/> class. /// </summary> /// <param name="type">The type of metadata contained by the enclosing element.</param> /// <param name="text">The non-translatable text.</param> public Meta(string type, string text) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.NonTranslatableText = text; if (type != null) { this.Type = type; } }
/// <summary> /// Initializes a new instance of the <see cref="MarkedSpanStart"/> class. /// </summary> /// <param name="id">The Id of the marked span.</param> public MarkedSpanStart(string id) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); this.Id = id; this.SubFormatStyle = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase); this.EnableAttribute(MarkedSpanStart.PropertyNames.EquivalentStorage, false); this.EnableAttribute(MarkedSpanStart.PropertyNames.SizeInfo, false); this.EnableAttribute(MarkedSpanStart.PropertyNames.SizeInfoReference, false); }
/// <summary> /// Initializes a new instance of the <see cref="GlossaryEntry"/> class. /// </summary> /// <param name="id">The Id of the entry.</param> public GlossaryEntry(string id) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); this.Id = id; this.Term = new Term(); this.Translations = new ParentAttachedList <Translation>(this); // The default .ctor is called during deserialization and that is the only case where term can be overridden. this.storedTerm = id != null; }
/// <summary> /// Initializes a new instance of the <see cref="Data"/> class. /// </summary> /// <param name="id">The Id of the data.</param> /// <param name="text">The non-translatable text.</param> public Data(string id, string text) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.Id = id; this.Text = new ParentAttachedList <ResourceStringContent>(this); if (text != null) { this.Text.Add(new PlainText(text)); } }
/// <summary> /// Initializes a new instance of the <see cref="TranslationContainer"/> class. /// </summary> /// <param name="id">The Id of the container.</param> /// <param name="canOverrideNotes">True if notes can be replaced during deserialization, false if they cannot. /// </param> internal TranslationContainer(string id, bool canOverrideNotes) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.EnableAttribute(TranslationContainer.PropertyNames.EquivalentStorage, false); this.extensions = new Lazy <List <IExtension> >(); this.noteContainer = new NoteContainer(); Utilities.SetParent(this.noteContainer, this); this.Id = id; this.SubFormatStyle = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase); this.storedNotes = !canOverrideNotes; }
/// <summary> /// Initializes a new instance of the <see cref="Unit"/> class. /// </summary> /// <param name="id">The Id of the unit.</param> /// <param name="internalCtor">True if this internal constructor was called that is used for deserialization, /// false if the public one was called. /// </param> private Unit(string id, bool internalCtor) : base(id, internalCtor) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.translationCandidates = new TranslationMatches(); Utilities.SetParent(this.translationCandidates, this); // DEV NOTE: Order of segments must be maintained during serialization and deserialization so make sure // the order can be preserved. Using a type of list maintains order, but if you change this.Resources // to another type (like dictionary), make sure you have a way to maintain order. this.Resources = new ParentAttachedList <ContainerResource>(this); // The default .ctor is called during deserialization and that is the only case where matches can be overridden. this.storedMatches = !internalCtor; }
/// <summary> /// Initializes a new instance of the <see cref="File"/> class. /// </summary> /// <param name="id">The Id of the file.</param> public File(string id) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); this.noteContainer = new NoteContainer(); Utilities.SetParent(this.noteContainer, this); this.Containers = new ParentAttachedList <TranslationContainer>(this); this.Id = id; this.SubFormatStyle = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase); this.storedNotes = true; this.EnableAttribute(File.PropertyNames.EquivalentStorage, false); }
/// <summary> /// Initializes a new instance of the <see cref="Ignorable"/> class. /// </summary> /// <param name="id">The Id of the element.</param> public Ignorable(string id) : base(id) { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); }
/// <summary> /// Initializes a new instance of the <see cref="Rule"/> class. /// </summary> public Rule() { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.extensions = new Lazy <List <IExtension> >(); }
/// <summary> /// Initializes a new instance of the <see cref="XliffProvider"/> class. /// </summary> public XliffProvider() { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); }
/// <summary> /// Initializes a new instance of the <see cref="TranslationMatches"/> class. /// </summary> public TranslationMatches() { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.Matches = new ParentAttachedList <Match>(this); }
/// <summary> /// Initializes a new instance of the <see cref="MetaGroup"/> class. /// </summary> public MetaGroup() { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.Containers = new ParentAttachedList <MetaElement>(this); }
/// <summary> /// Initializes a new instance of the <see cref="OriginalData"/> class. /// </summary> public OriginalData() { this.RegisterElementInformation(ElementInformationFromReflection.Create(this)); this.DataElements = new ParentAttachedList <Data>(this); }