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")); }
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")); }
protected void Reset() { combinedRules = null; combinedNamespaces = null; this.Errors.Clear(); this.Warnings.Clear(); }
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; }
protected void Reset() { combinedRules = null; combinedNamespaces = null; }