Class Filter
Represents a filter meant to retrieve a subset of translation units from a translation memory.
Inheritance
Inherited Members
Namespace: Sdl.LanguagePlatform.TranslationMemory
Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
Syntax
public class Filter
Constructors
Filter(FilterExpression, String, Int32)
Initializes a new instance of the Filter class with the specified expression, name and penalty.
Declaration
public Filter(FilterExpression filterExpression, string name, int penalty)
Parameters
Type | Name | Description |
---|---|---|
FilterExpression | filterExpression | The filter expression. |
System.String | name | The filter name (non-null, non-empty, and cannot contain blanks). |
System.Int32 | penalty | The filter penalty (0 or larger). |
Properties
FilterExpression
Gets or sets the filter expression.
Declaration
public FilterExpression FilterExpression { get; set; }
Property Value
Type | Description |
---|---|
FilterExpression |
Name
Gets or sets the filter name. Filter names must be non-empty and cannot contain blanks.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Penalty
Gets or sets the filter penalty.
Declaration
public int Penalty { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
Load(Stream)
Loads an filter from the specified stream.
Declaration
public static Filter Load(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to read the data from |
Returns
Type | Description |
---|---|
Filter | The filter loaded from the specified stream. |
Load(String)
Loads a filter from the specified file name.
Declaration
public static Filter Load(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The file name to load the data from. |
Returns
Type | Description |
---|---|
Filter | The filter stored in the specified file. |
Save(Stream)
Serializes the filter to the specified output stream.
Declaration
public void Save(Stream outputStream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | outputStream | The output stream. |
Save(String)
Saves the filter in the specified file.
Declaration
public void Save(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The file name to save the filter in. Existing files will be overwritten. |