C# Class Localization.Xliff.Samples.SampleCode

This class contains the entry point to the application that demonstrates how to use the XLIFF 2.0 object model.
显示文件 Open project: Microsoft/XLIFF2-Object-Model Class Usage Examples

Public Methods

Method Description
BlankDocument ( ) : void

Demonstrates how to create a blank XLIFF document.

DisableValidationOnWrite ( Localization.Xliff.OM.Core.XliffDocument document, string file ) : void

Demonstrates how to disable validation when writing an XLIFF document.

Main ( string args ) : void

The main entry point for the application.

ReadDocument ( string file ) : void

Demonstrates how to read an XLIFF document from a file.

StoreCustomExtension ( ) : void

Demonstrates how to store custom attributes and elements on a File element using a custom extension and element types.

StoreGenericExtension ( ) : void

Demonstrates how to store custom attributes and elements on a File element using the built in generic extension support.

StoreGlossary ( ) : void

Demonstrates how to store Glossary data in a Unit element.

StoreMatches ( ) : void

Demonstrates how to store Match data in a Unit element.

StoreMetadata ( ) : void

Demonstrates how to store metadata in a File element.

ViewValidations ( Localization.Xliff.OM.Core.XliffDocument document, string file ) : void

Demonstrates how to validate a document on write and display the data where the validation error occurred.

WhiteSpaces ( ) : void
WriteDocument ( Localization.Xliff.OM.Core.XliffDocument document, string file ) : void

Demonstrates how to write an XLIFF document to a file.

Method Details

BlankDocument() public static method

Demonstrates how to create a blank XLIFF document.
public static BlankDocument ( ) : void
return void

DisableValidationOnWrite() public static method

Demonstrates how to disable validation when writing an XLIFF document.
public static DisableValidationOnWrite ( Localization.Xliff.OM.Core.XliffDocument document, string file ) : void
document Localization.Xliff.OM.Core.XliffDocument The document to write.
file string The path to the document to write.
return void

Main() public static method

The main entry point for the application.
public static Main ( string args ) : void
args string Command line arguments passed to the application.
return void

ReadDocument() public static method

Demonstrates how to read an XLIFF document from a file.
public static ReadDocument ( string file ) : void
file string The path to the document to read.
return void

StoreCustomExtension() public static method

Demonstrates how to store custom attributes and elements on a File element using a custom extension and element types.
public static StoreCustomExtension ( ) : void
return void

StoreGenericExtension() public static method

Demonstrates how to store custom attributes and elements on a File element using the built in generic extension support.
public static StoreGenericExtension ( ) : void
return void

StoreGlossary() public static method

Demonstrates how to store Glossary data in a Unit element.
public static StoreGlossary ( ) : void
return void

StoreMatches() public static method

Demonstrates how to store Match data in a Unit element.
public static StoreMatches ( ) : void
return void

StoreMetadata() public static method

Demonstrates how to store metadata in a File element.
public static StoreMetadata ( ) : void
return void

ViewValidations() public static method

Demonstrates how to validate a document on write and display the data where the validation error occurred.
public static ViewValidations ( Localization.Xliff.OM.Core.XliffDocument document, string file ) : void
document Localization.Xliff.OM.Core.XliffDocument The document to validate.
file string The path to write the document to.
return void

WhiteSpaces() public static method

public static WhiteSpaces ( ) : void
return void

WriteDocument() public static method

Demonstrates how to write an XLIFF document to a file.
public static WriteDocument ( Localization.Xliff.OM.Core.XliffDocument document, string file ) : void
document Localization.Xliff.OM.Core.XliffDocument The document to write.
file string The path to write the document to.
return void