예제 #1
0
        protected XmlResourceValidator(ContentFile file, GameResources resources, GameResources expansionResourcesUsed)
        {
            this.resources = resources;
            this.path      = file.FullName;
            this.expansionResourcesUsed = expansionResourcesUsed;

            using (Stream xmlStream = file.OpenRead())
            {
                this.doc = XDocument.Load(xmlStream, LoadOptions.SetLineInfo);
            }

            this.isCoreGame      = file.Directory.IsCoreGame;
            this.expansionNumber = file.ExpansionNumber;

            this.result = new XmlFileValidationErrorList
            {
                Path   = this.path,
                Errors = new List <XmlValidationError>()
            };
        }
        protected XmlResourceValidator( ContentFile file, GameResources resources, GameResources expansionResourcesUsed )
        {
            this.resources = resources;
            this.path = file.FullName;
            this.expansionResourcesUsed = expansionResourcesUsed;

            using ( Stream xmlStream = file.OpenRead() )
            {
                this.doc = XDocument.Load( xmlStream, LoadOptions.SetLineInfo );
            }

            this.isCoreGame = file.Directory.IsCoreGame;
            this.expansionNumber = file.ExpansionNumber;

            this.result = new XmlFileValidationErrorList
            {
                Path = this.path,
                Errors = new List<XmlValidationError>()
            };
        }