Search Results for

    Show / Hide Table of Contents

    Class ServerBasedLanguageResourcesTemplate

    Represents a ILanguageResourcesTemplate which is stored on a server.

    Inheritance
    System.Object
    ServerBasedLanguageResourcesTemplate
    Implements
    ILanguageResourcesTemplate
    System.ComponentModel.INotifyPropertyChanged
    System.IEquatable<ServerBasedLanguageResourcesTemplate>
    System.ComponentModel.IEditableObject
    IPermissionCheck
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Sdl.LanguagePlatform.TranslationMemoryApi
    Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
    Syntax
    public class ServerBasedLanguageResourcesTemplate : ILanguageResourcesTemplate, INotifyPropertyChanged, IEquatable<ServerBasedLanguageResourcesTemplate>, IEditableObject, IPermissionCheck

    Constructors

    ServerBasedLanguageResourcesTemplate(TranslationProviderServer)

    Creates a new, empty language resources template.

    Declaration
    public ServerBasedLanguageResourcesTemplate(TranslationProviderServer server)
    Parameters
    Type Name Description
    TranslationProviderServer server

    The server on which to create the language resources template.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown if server is null.

    Properties

    CurrentLangResApplyOperation

    Gets the most recent scheduled field template apply operation; if any.

    Declaration
    public ScheduledLanguageResourcesApplyOperation CurrentLangResApplyOperation { get; }
    Property Value
    Type Description
    ScheduledLanguageResourcesApplyOperation

    Description

    Gets or sets the description of this language resources template.

    Declaration
    public string Description { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Note that you have to call Save() to persists the change after setting this property.

    Exceptions
    Type Condition
    ObjectDeletedException

    Thrown when trying to get or set the description of an entity that no longer exists.

    Id

    Gets the unique ID of this language resources template.

    Declaration
    public Guid Id { get; }
    Property Value
    Type Description
    System.Guid

    IsDeleted

    Returns

    true
    if this translation memory has been deleted.

    Declaration
    public bool IsDeleted { get; }
    Property Value
    Type Description
    System.Boolean

    IsDirty

    Returns

    true
    if this language resources template has unsaved changes.

    Declaration
    public bool IsDirty { get; }
    Property Value
    Type Description
    System.Boolean

    IsNewObject

    Returns

    true
    if this language resources template has not been saved yet.

    Declaration
    public bool IsNewObject { get; }
    Property Value
    Type Description
    System.Boolean

    LanguageResourceBundles

    Gets the language resources bundles contained in this template.

    Declaration
    public LanguageResourceBundleCollection LanguageResourceBundles { get; }
    Property Value
    Type Description
    LanguageResourceBundleCollection
    Remarks

    Note that you have to call Save() to persist any changes made to language resources.

    LinkedResourceGroupPaths

    Gets the collection of paths for the linked resource groups.

    Declaration
    public string[] LinkedResourceGroupPaths { get; set; }
    Property Value
    Type Description
    System.String[]

    Name

    Gets or sets the name of this language resources template.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Note that you have to call Save() to persists the change after setting this property.

    Exceptions
    Type Condition
    ObjectDeletedException

    Thrown when trying to get or set the name of an entity that no longer exists.

    ParentResourceGroupDescription

    Gets the parent resource group description.

    Declaration
    public string ParentResourceGroupDescription { get; set; }
    Property Value
    Type Description
    System.String

    ParentResourceGroupName

    Gets the parent resource group name.

    Declaration
    public string ParentResourceGroupName { get; set; }
    Property Value
    Type Description
    System.String

    ParentResourceGroupPath

    Gets the parent resource group path.

    Declaration
    public string ParentResourceGroupPath { get; set; }
    Property Value
    Type Description
    System.String

    TranslationMemories

    Gets the collection of translation memories associated with this language resources template.

    Declaration
    public ReadOnlyCollection<ServerBasedTranslationMemory> TranslationMemories { get; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ReadOnlyCollection<ServerBasedTranslationMemory>
    Remarks

    If the list of translation memories has been pre-loaded, the in-memory collection of translation memories is returned, otherwise the list of translation memories is retrieved from the server on-demand.

    Exceptions
    Type Condition
    ObjectDeletedException

    Thrown when this object has already been deleted.

    TranslationProviderServer

    Gets the server.

    Declaration
    public TranslationProviderServer TranslationProviderServer { get; }
    Property Value
    Type Description
    TranslationProviderServer

    Methods

    Delete()

    Deletes this language resources template.

    Declaration
    public void Delete()
    Remarks

    If any translation memories are currently associated with the language resources template, the language resources of these translation memories will not be affected.

    Exceptions
    Type Condition
    ObjectDeletedException

    Thrown when this object has already been deleted.

    ObjectNotSavedException

    Thrown when this object has not been initially saved yet.

    Equals(ServerBasedLanguageResourcesTemplate)

    Returns true if this template has the same Id as the specified template.

    Declaration
    public bool Equals(ServerBasedLanguageResourcesTemplate other)
    Parameters
    Type Name Description
    ServerBasedLanguageResourcesTemplate other

    A template to compare to.

    Returns
    Type Description
    System.Boolean

    True if this template has the same Id as the specified template.

    Equals(Object)

    Returns true if this language resources template has the same Id as the specified language resources template.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj

    A language resources template to compare to.

    Returns
    Type Description
    System.Boolean

    True if this language resources template has the same Id as the specified language resources template.

    Overrides
    System.Object.Equals(System.Object)

    GetHashCode()

    Returns a hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

    Overrides
    System.Object.GetHashCode()

    HasPermission(String)

    Gets whether this object has the permission with the specified name.

    Declaration
    public bool HasPermission(string permission)
    Parameters
    Type Name Description
    System.String permission

    The permission name.

    Returns
    Type Description
    System.Boolean
    true
    is the object has the specified permission.

    Save()

    Saves this language resources template, including any changes to its language resource bundles.

    Declaration
    public void Save()
    Exceptions
    Type Condition
    ObjectDeletedException

    Thrown when this object has already been deleted.

    Implements

    ILanguageResourcesTemplate
    System.ComponentModel.INotifyPropertyChanged
    System.IEquatable<T>
    System.ComponentModel.IEditableObject
    IPermissionCheck

    On this page

    • Constructors
      • ServerBasedLanguageResourcesTemplate(TranslationProviderServer)
    • Properties
      • CurrentLangResApplyOperation
      • Description
      • Id
      • IsDeleted
      • IsDirty
      • IsNewObject
      • LanguageResourceBundles
      • LinkedResourceGroupPaths
      • Name
      • ParentResourceGroupDescription
      • ParentResourceGroupName
      • ParentResourceGroupPath
      • TranslationMemories
      • TranslationProviderServer
    • Methods
      • Delete()
      • Equals(ServerBasedLanguageResourcesTemplate)
      • Equals(Object)
      • GetHashCode()
      • HasPermission(String)
      • Save()
    • Implements
    Back to top Generated by DocFX