Esempio n. 1
0
 private void RegisterNamespaceRule(CssNamespaceRule aRule)
 {
     if (mNameSpaceMap == null)
     {
         CreateNamespaceMap();
     }
     // ReSharper disable once PossibleNullReferenceException - CreateNamespaceMap ensures it is not null
     mNameSpaceMap.AddPrefix(aRule.GetPrefix(), aRule.GetURLSpec());
 }
Esempio n. 2
0
        internal void ProcessNameSpace(string aPrefix,
                                        string aURLSpec,
                                        RuleAppendFunc aAppendFunc,
                                        object aData)
        {
            string prefix = "";

              if (!aPrefix.IsEmpty()) {
            prefix = String.Intern(aPrefix);
            if (prefix == null) {
              Debug.Fail("String.Intern failed - out of memory?");
            }
              }

              NameSpaceRule rule = new NameSpaceRule(prefix, aURLSpec);
              aAppendFunc(rule, aData);

              // If this was the first namespace rule encountered, it will trigger
              // creation of a namespace map.
              if (mNameSpaceMap == null) {
            mNameSpaceMap = mSheet.GetNameSpaceMap();
              }
        }