Exemplo n.º 1
0
        public void Validate(string paramName)
        {
            if (!(File.Exists(Path)))
            {
                throw new SemanticArgumentException($"argument must point to an actual file.", paramName);
            }

            if (!SerializationUtility.ProbeIsJsonOrXml(Path))
            {
                throw new SemanticArgumentException($"argument must refer to a file that contains either JSON or XML.", paramName);
            }
        }