Patcher.Rules.RuleReader.RuleReader C# (CSharp) Method

RuleReader() public method

public RuleReader ( Stream stream ) : System
stream Stream
return System
        public RuleReader(Stream stream)
        {
            // Take rule filename from stream if it is a file stream
            FileStream fileStream = stream as FileStream;

            document = XDocument.Load(stream);

            if (document.Root.Name != "rules")
            {
                throw new InvalidDataException("Unexpected root element name");
            }
        }