예제 #1
0
        private void Invalidate()
        {
            Version++;
            Reset();

            var sheet = CssParser.Parse(content ?? "", null, GetCombinedVariables());

            foreach (var error in sheet.Errors)
            {
                this.LocalErrors.Add(error);
            }
            foreach (var warning in sheet.Warnings)
            {
                this.LocalWarnings.Add(warning);
            }

            this.localNamespaces = sheet.LocalNamespaces;
            this.localRules      = sheet.LocalRules;
            this.variables       = sheet.Variables;

            EagerLoading();

            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Content"));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("LocalRules"));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Errors"));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Warnings"));
        }
예제 #2
0
        private void Invalidate()
        {
            Version++;
            Reset();

            var sheet = CssParser.Parse(content ?? "", BaseStyleSheets.LastOrDefault()?.Namespaces.FirstOrDefault(x => x.Alias == "")?.Namespace ?? CssParser.defaultCssNamespace, GetCombinedVariables());

            foreach (var error in sheet.Errors)
            {
                this.LocalErrors.Add(error);
            }
            foreach (var warning in sheet.Warnings)
            {
                this.LocalWarnings.Add(warning);
            }

            this.localNamespaces = sheet.LocalNamespaces;
            this.localRules      = sheet.LocalRules;
            this.variables       = sheet.Variables;

            EagerLoading();

            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Content"));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("LocalRules"));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("LocalNamespaces"));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Errors"));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Warnings"));
        }
예제 #3
0
        protected void Reset()
        {
            combinedRules      = null;
            combinedNamespaces = null;

            this.Errors.Clear();
            this.Warnings.Clear();
        }
예제 #4
0
        protected void Reset()
        {
            combinedRules      = null;
            combinedNamespaces = null;
            namespaceUri2Alias.Clear();
            prefix2NamespaceUri.Clear();
            variables = null;

            this.localErrors.Clear();
            this.localWarnings.Clear();
            this.errors   = null;
            this.warnings = null;
        }
예제 #5
0
 protected void Reset()
 {
     combinedRules      = null;
     combinedNamespaces = null;
 }