コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="XliffReader"/> class.
        /// </summary>
        /// <param name="settings">Settings that determine how to read content.</param>
        public XliffReader(XliffReaderSettings settings)
        {
            GenericExtensionHandler defaultHandler;

            ArgValidator.Create(settings, "settings").IsNotNull();

            this.elementStack = new Stack<ElementState>();
            this.handlers = new Lazy<Dictionary<string, IExtensionHandler>>();
            this.settings = settings;

            defaultHandler = new GenericExtensionHandler();
            this.RegisterExtensionHandler(XliffReader.DefaultHandlerKey, defaultHandler);
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="XliffReader"/> class.
        /// </summary>
        /// <param name="settings">Settings that determine how to read content.</param>
        public XliffReader(XliffReaderSettings settings)
        {
            GenericExtensionHandler defaultHandler;

            ArgValidator.Create(settings, "settings").IsNotNull();

            this.elementStack = new Stack <ElementState>();
            this.handlers     = new Lazy <Dictionary <string, IExtensionHandler> >();
            this.settings     = settings;

            defaultHandler = new GenericExtensionHandler();
            this.RegisterExtensionHandler(XliffReader.DefaultHandlerKey, defaultHandler);
        }