예제 #1
0
 public abstract void BeginChildren(int size,
                                    ConfigNodeSubType subType,
                                    ConfigNodeType nType,
                                    int terminal,
                                    [MarshalAs(UnmanagedType.LPWStr)] String text,
                                    int textLength,
                                    int prefixLength);
예제 #2
0
 public abstract void CreateAttribute(int size,
                                      ConfigNodeSubType subType,
                                      ConfigNodeType nType,
                                      int terminal,
                                      [MarshalAs(UnmanagedType.LPWStr)] String text,
                                      int textLength,
                                      int prefixLength);
예제 #3
0
 public override void BeginChildren(int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength)
 {
     if ((!this.parsing && !this.bNoSearchPath) && ((this.depth == (this.searchDepth + 1)) && (string.Compare(text, this.treeRootPath[this.searchDepth], StringComparison.Ordinal) == 0)))
     {
         this.searchDepth++;
     }
 }
예제 #4
0
 public void CreateNode(int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength)
 {
     if (nType == ConfigNodeType.Element)
     {
         this.lastProcessed = "<" + text + ">";
         if ((this.parsing || (this.bNoSearchPath && (string.Compare(text, this.treeRootPath[0], StringComparison.OrdinalIgnoreCase) == 0))) || (((this.depth == this.searchDepth) && (this.searchDepth == this.pathDepth)) && (string.Compare(text, this.treeRootPath[this.pathDepth], StringComparison.OrdinalIgnoreCase) == 0)))
         {
             this.parsing = true;
             ConfigNode currentNode = this.currentNode;
             this.currentNode = new ConfigNode(text, currentNode);
             if (this.rootNode == null)
             {
                 this.rootNode = this.currentNode;
             }
             else
             {
                 currentNode.AddChild(this.currentNode);
             }
         }
         else
         {
             this.depth++;
         }
     }
     else if ((nType == ConfigNodeType.PCData) && (this.currentNode != null))
     {
         this.currentNode.Value = text;
     }
 }
예제 #5
0
 public void BeginChildren(int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength)
 {
     if ((!this.parsing && !this.bNoSearchPath) && ((this.depth == (this.searchDepth + 1)) && (string.Compare(text, this.treeRootPath[this.searchDepth], StringComparison.Ordinal) == 0)))
     {
         this.searchDepth++;
     }
 }
예제 #6
0
파일: cfgparser.cs 프로젝트: ydunk/masters
        public void EndChildren(int fEmpty,
                                int size,
                                ConfigNodeSubType subType,
                                ConfigNodeType nType,
                                int terminal,
                                [MarshalAs(UnmanagedType.LPWStr)] String text,
                                int textLength,
                                int prefixLength)
        {
            lastProcessed = "</" + text + ">";
            if (parsing)
            {
                //Trace("EndChildren",size,subType,nType,terminal,text,textLength,prefixLength,fEmpty);

                if (currentNode == rootNode)
                {
                    // End of section of tree which is parsed
                    parsing = false;
                }

                currentNode = currentNode.Parent;
            }
            else if (nType == ConfigNodeType.Element)
            {
                if (depth == searchDepth && String.Compare(text, treeRootPath[searchDepth - 1], false, CultureInfo.InvariantCulture) == 0)
                {
                    searchDepth--;
                    depth--;
                }
                else
                {
                    depth--;
                }
            }
        }
예제 #7
0
 public override void CreateNode(int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength)
 {
     if (nType == ConfigNodeType.Element)
     {
         this.lastProcessed           = text;
         this.lastProcessedEndElement = false;
         if (this.parsing || this.bNoSearchPath && string.Compare(text, this.treeRootPath[0], StringComparison.OrdinalIgnoreCase) == 0 || this.depth == this.searchDepth && this.searchDepth == this.pathDepth && string.Compare(text, this.treeRootPath[this.pathDepth], StringComparison.OrdinalIgnoreCase) == 0)
         {
             this.parsing = true;
             ConfigNode parent = this.currentNode;
             this.currentNode = new ConfigNode(text, parent);
             if (this.rootNode == null)
             {
                 this.rootNode = this.currentNode;
             }
             else
             {
                 parent.AddChild(this.currentNode);
             }
         }
         else
         {
             this.depth = this.depth + 1;
         }
     }
     else
     {
         if (nType != ConfigNodeType.PCData || this.currentNode == null)
         {
             return;
         }
         this.currentNode.Value = text;
     }
 }
예제 #8
0
파일: cfgparser.cs 프로젝트: ydunk/masters
 public void CreateAttribute(int size,
                             ConfigNodeSubType subType,
                             ConfigNodeType nType,
                             int terminal,
                             [MarshalAs(UnmanagedType.LPWStr)] String text,
                             int textLength,
                             int prefixLength)
 {
     //Trace("CreateAttribute",size,subType,nType,terminal,text,textLength,prefixLength,0);
     if (parsing)
     {
         // if the value of the attribute is null, the parser doesn't come back, so need to store the attribute when the
         // attribute name is encountered
         if (nType == ConfigNodeType.Attribute)
         {
             attributeEntry = currentNode.AddAttribute(text, "");
             key            = text;
         }
         else if (nType == ConfigNodeType.PCData)
         {
             currentNode.ReplaceAttribute(attributeEntry, key, text);
         }
         else
         {
             throw new ApplicationException(String.Format(Environment.GetResourceString("XML_Syntax_InvalidSyntaxInFile"), fileName, lastProcessed));
         }
     }
 }
예제 #9
0
 public override void CreateNode(int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength)
 {
     if (nType == ConfigNodeType.Element)
     {
         this.lastProcessed = "<" + text + ">";
         if ((this.parsing || (this.bNoSearchPath && (string.Compare(text, this.treeRootPath[0], StringComparison.OrdinalIgnoreCase) == 0))) || (((this.depth == this.searchDepth) && (this.searchDepth == this.pathDepth)) && (string.Compare(text, this.treeRootPath[this.pathDepth], StringComparison.OrdinalIgnoreCase) == 0)))
         {
             this.parsing = true;
             ConfigNode currentNode = this.currentNode;
             this.currentNode = new ConfigNode(text, currentNode);
             if (this.rootNode == null)
             {
                 this.rootNode = this.currentNode;
             }
             else
             {
                 currentNode.AddChild(this.currentNode);
             }
         }
         else
         {
             this.depth++;
         }
     }
     else if ((nType == ConfigNodeType.PCData) && (this.currentNode != null))
     {
         this.currentNode.Value = text;
     }
 }
예제 #10
0
 public override void CreateAttribute(int size,
                                      ConfigNodeSubType subType,
                                      ConfigNodeType nType,
                                      int terminal,
                                      [MarshalAs(UnmanagedType.LPWStr)] String text,
                                      int textLength,
                                      int prefixLength)
 {
     //Trace("CreateAttribute",size,subType,nType,terminal,text,textLength,prefixLength,0);
     if (parsing)
     {
         // if the value of the attribute is null, the parser doesn't come back, so need to store the attribute when the
         // attribute name is encountered
         if (nType == ConfigNodeType.Attribute)
         {
             attributeEntry = currentNode.AddAttribute(text, "");
             key            = text;
         }
         else if (nType == ConfigNodeType.PCData)
         {
             currentNode.ReplaceAttribute(attributeEntry, key, text);
         }
         else
         {
             String message = GetInvalidSyntaxMessage();
             // Neither Exception nor ApplicationException are the "right" exceptions here.
             // Desktop throws ApplicationException for backwards compatibility.
             // On Silverlight we don't have ApplicationException, so fall back to Exception.
             throw new Exception(message);
         }
     }
 }
예제 #11
0
 public override void BeginChildren(int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength)
 {
     if (this.parsing || this.bNoSearchPath || (this.depth != this.searchDepth + 1 || string.Compare(text, this.treeRootPath[this.searchDepth], StringComparison.Ordinal) != 0))
     {
         return;
     }
     this.searchDepth = this.searchDepth + 1;
 }
예제 #12
0
파일: cfgparser.cs 프로젝트: ydunk/masters
 public void Error(int size,
                   ConfigNodeSubType subType,
                   ConfigNodeType nType,
                   int terminal,
                   [MarshalAs(UnmanagedType.LPWStr)] String text,
                   int textLength,
                   int prefixLength)
 {
     //Trace("Error",size,subType,nType,terminal,text,textLength,prefixLength,0);
 }
예제 #13
0
        public override void CreateNode(int size,
                                        ConfigNodeSubType subType,
                                        ConfigNodeType nType,
                                        int terminal,
                                        [MarshalAs(UnmanagedType.LPWStr)] String text,
                                        int textLength,
                                        int prefixLength)
        {
            //Trace("CreateNode",size,subType,nType,terminal,text,textLength,prefixLength,0);

            if (nType == ConfigNodeType.Element)
            {
                // New Node
                lastProcessed           = text;
                lastProcessedEndElement = false;

                if (parsing ||
                    (bNoSearchPath &&
                     String.Compare(text, treeRootPath[0], StringComparison.OrdinalIgnoreCase) == 0) ||
                    (depth == searchDepth && searchDepth == pathDepth &&
                     String.Compare(text, treeRootPath[pathDepth], StringComparison.OrdinalIgnoreCase) == 0))
                {
                    parsing = true;

                    ConfigNode parentNode = currentNode;
                    currentNode = new ConfigNode(text, parentNode);
                    if (rootNode == null)
                    {
                        rootNode = currentNode;
                    }
                    else
                    {
                        parentNode.AddChild(currentNode);
                    }
                }
                else
                {
                    depth++;
                }
            }
            else if (nType == ConfigNodeType.PCData)
            {
                // Data node
                if (currentNode != null)
                {
                    currentNode.Value = text;
                }
            }
        }
예제 #14
0
파일: cfgparser.cs 프로젝트: ydunk/masters
 public void BeginChildren(int size,
                           ConfigNodeSubType subType,
                           ConfigNodeType nType,
                           int terminal,
                           [MarshalAs(UnmanagedType.LPWStr)] String text,
                           int textLength,
                           int prefixLength)
 {
     //Trace("BeginChildren",size,subType,nType,terminal,text,textLength,prefixLength,0);
     if (!parsing &&
         (!bNoSearchPath &&
          depth == (searchDepth + 1) &&
          String.Compare(text, treeRootPath[searchDepth], false, CultureInfo.InvariantCulture) == 0))
     {
         searchDepth++;
     }
 }
예제 #15
0
파일: cfgparser.cs 프로젝트: ydunk/masters
        public void CreateNode(int size,
                               ConfigNodeSubType subType,
                               ConfigNodeType nType,
                               int terminal,
                               [MarshalAs(UnmanagedType.LPWStr)] String text,
                               int textLength,
                               int prefixLength)
        {
            //Trace("CreateNode",size,subType,nType,terminal,text,textLength,prefixLength,0);

            if (nType == ConfigNodeType.Element)
            {
                // New Node
                lastProcessed = "<" + text + ">";
                if (parsing ||
                    (bNoSearchPath &&
                     String.Compare(text, treeRootPath[0], true, CultureInfo.InvariantCulture) == 0) ||
                    (depth == searchDepth && searchDepth == pathDepth &&
                     String.Compare(text, treeRootPath[pathDepth], true, CultureInfo.InvariantCulture) == 0))
                {
                    parsing = true;

                    ConfigNode parentNode = currentNode;
                    currentNode = new ConfigNode(text, parentNode);
                    if (rootNode == null)
                    {
                        rootNode = currentNode;
                    }
                    else
                    {
                        parentNode.AddChild(currentNode);
                    }
                }
                else if (nType == ConfigNodeType.PCData)
                {
                    // Data node
                    currentNode.Value = text;
                }
                else
                {
                    depth++;
                }
            }
        }
예제 #16
0
 public override void CreateAttribute(int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength)
 {
     if (this.parsing)
     {
         if (nType == ConfigNodeType.Attribute)
         {
             this.attributeEntry = this.currentNode.AddAttribute(text, "");
             this.key            = text;
         }
         else
         {
             if (nType != ConfigNodeType.PCData)
             {
                 throw new ApplicationException(Environment.GetResourceString("XML_Syntax_InvalidSyntaxInFile", new object[] { this.fileName, this.lastProcessed }));
             }
             this.currentNode.ReplaceAttribute(this.attributeEntry, this.key, text);
         }
     }
 }
예제 #17
0
파일: cfgparser.cs 프로젝트: ydunk/masters
 private void Trace(String name,
                    int size,
                    ConfigNodeSubType subType,
                    ConfigNodeType nType,
                    int terminal,
                    [MarshalAs(UnmanagedType.LPWStr)] String text,
                    int textLength,
                    int prefixLength, int fEmpty)
 {
     BCLDebug.Trace("REMOTE", "Node " + name);
     BCLDebug.Trace("REMOTE", "text " + text);
     BCLDebug.Trace("REMOTE", "textLength " + textLength);
     BCLDebug.Trace("REMOTE", "size " + size);
     BCLDebug.Trace("REMOTE", "subType " + ((Enum)subType).ToString());
     BCLDebug.Trace("REMOTE", "nType " + ((Enum)nType).ToString());
     BCLDebug.Trace("REMOTE", "terminal " + terminal);
     BCLDebug.Trace("REMOTE", "prefixLength " + prefixLength);
     BCLDebug.Trace("REMOTE", "fEmpty " + fEmpty + "\n");
 }
예제 #18
0
 public void CreateAttribute(int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength)
 {
     if (this.parsing)
     {
         if (nType == ConfigNodeType.Attribute)
         {
             this.attributeEntry = this.currentNode.AddAttribute(text, "");
             this.key = text;
         }
         else
         {
             if (nType != ConfigNodeType.PCData)
             {
                 throw new ApplicationException(string.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("XML_Syntax_InvalidSyntaxInFile"), new object[] { this.fileName, this.lastProcessed }));
             }
             this.currentNode.ReplaceAttribute(this.attributeEntry, this.key, text);
         }
     }
 }
예제 #19
0
 public override void CreateAttribute(int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength)
 {
     if (!this.parsing)
     {
         return;
     }
     if (nType == ConfigNodeType.Attribute)
     {
         this.attributeEntry = this.currentNode.AddAttribute(text, "");
         this.key            = text;
     }
     else
     {
         if (nType != ConfigNodeType.PCData)
         {
             throw new ApplicationException(this.GetInvalidSyntaxMessage());
         }
         this.currentNode.ReplaceAttribute(this.attributeEntry, this.key, text);
     }
 }
예제 #20
0
 public void EndChildren(int fEmpty, int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength)
 {
     this.lastProcessed = "</" + text + ">";
     if (this.parsing)
     {
         if (this.currentNode == this.rootNode)
         {
             this.parsing = false;
         }
         this.currentNode = this.currentNode.Parent;
     }
     else if (nType == ConfigNodeType.Element)
     {
         if ((this.depth == this.searchDepth) && (string.Compare(text, this.treeRootPath[this.searchDepth - 1], StringComparison.Ordinal) == 0))
         {
             this.searchDepth--;
             this.depth--;
         }
         else
         {
             this.depth--;
         }
     }
 }
예제 #21
0
 public void EndChildren(int fEmpty, int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength)
 {
     this.lastProcessed = "</" + text + ">";
     if (this.parsing)
     {
         if (this.currentNode == this.rootNode)
         {
             this.parsing = false;
         }
         this.currentNode = this.currentNode.Parent;
     }
     else if (nType == ConfigNodeType.Element)
     {
         if ((this.depth == this.searchDepth) && (string.Compare(text, this.treeRootPath[this.searchDepth - 1], StringComparison.Ordinal) == 0))
         {
             this.searchDepth--;
             this.depth--;
         }
         else
         {
             this.depth--;
         }
     }
 }
예제 #22
0
        public override void CreateAttribute(int size,
                                    ConfigNodeSubType subType, 
                                    ConfigNodeType nType,                                   
                                    int terminal, 
                                    [MarshalAs(UnmanagedType.LPWStr)]String text, 
                                    int textLength, 
                                    int prefixLength)
        {
            //Trace("CreateAttribute",size,subType,nType,terminal,text,textLength,prefixLength,0);
            if (parsing)
            {
                // if the value of the attribute is null, the parser doesn't come back, so need to store the attribute when the
                // attribute name is encountered
                if (nType == ConfigNodeType.Attribute)
                {
                    attributeEntry = currentNode.AddAttribute(text, "");
                    key = text;
                }
                else if (nType == ConfigNodeType.PCData)
                {
                    currentNode.ReplaceAttribute(attributeEntry, key, text);
                }
                else
                {
                    String message = GetInvalidSyntaxMessage();
                    // Neither Exception nor ApplicationException are the "right" exceptions here.
                    // Desktop throws ApplicationException for backwards compatibility.
                    // On Silverlight we don't have ApplicationException, so fall back to Exception.
#if FEATURE_CORECLR
                    throw new Exception(message);
#else
                    throw new ApplicationException(message);
#endif
                }
            }
        }
예제 #23
0
        private void Trace(String name,
                           int size,
                           ConfigNodeSubType subType, 
                           ConfigNodeType nType,                           
                           int terminal, 
                           [MarshalAs(UnmanagedType.LPWStr)]String text, 
                           int textLength, 
                           int prefixLength, int fEmpty)
        {

            BCLDebug.Trace("REMOTE","Node "+name);
            BCLDebug.Trace("REMOTE","text "+text);
            BCLDebug.Trace("REMOTE","textLength "+textLength);          
            BCLDebug.Trace("REMOTE","size "+size);
            BCLDebug.Trace("REMOTE","subType "+((Enum)subType).ToString());
            BCLDebug.Trace("REMOTE","nType "+((Enum)nType).ToString());
            BCLDebug.Trace("REMOTE","terminal "+terminal);
            BCLDebug.Trace("REMOTE","prefixLength "+prefixLength);          
            BCLDebug.Trace("REMOTE","fEmpty "+fEmpty+"\n");

        }
예제 #24
0
 public void CreateAttribute(int size,
                             ConfigNodeSubType subType, 
                             ConfigNodeType nType,                                   
                             int terminal, 
                             [MarshalAs(UnmanagedType.LPWStr)]String text, 
                             int textLength, 
                             int prefixLength)
 {
     //Trace("CreateAttribute",size,subType,nType,terminal,text,textLength,prefixLength,0);
     if (parsing)
     {
         // if the value of the attribute is null, the parser doesn't come back, so need to store the attribute when the
         // attribute name is encountered
         if (nType == ConfigNodeType.Attribute)
         {
             attributeEntry = currentNode.AddAttribute(text, "");
             key = text;
         }
         else if (nType == ConfigNodeType.PCData)
         {
             currentNode.ReplaceAttribute(attributeEntry, key, text);
         }
         else
             throw new ApplicationException(String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("XML_Syntax_InvalidSyntaxInFile"),fileName,lastProcessed));
     }
 }
예제 #25
0
        public void CreateNode(int size,
                               ConfigNodeSubType subType, 
                               ConfigNodeType nType, 
                               int terminal, 
                               [MarshalAs(UnmanagedType.LPWStr)]String text, 
                               int textLength, 
                               int prefixLength)
        {
            //Trace("CreateNode",size,subType,nType,terminal,text,textLength,prefixLength,0);

            if (nType == ConfigNodeType.Element)
            {
				// New Node
                lastProcessed = "<"+text+">";                           
                if (parsing  
                    || (bNoSearchPath &&
                        String.Compare(text, treeRootPath[0], StringComparison.OrdinalIgnoreCase) == 0)
                    || (depth == searchDepth && searchDepth == pathDepth && 
                        String.Compare(text, treeRootPath[pathDepth], StringComparison.OrdinalIgnoreCase) == 0 ))
                    {
                        parsing = true;
                        
                        ConfigNode parentNode = currentNode;
                        currentNode = new ConfigNode(text, parentNode);
                        if (rootNode == null)
                            rootNode = currentNode;
                        else
                            parentNode.AddChild(currentNode);
                    }
                else 
                    depth++;
            }
            else if (nType == ConfigNodeType.PCData)
            {
                // Data node
                if (currentNode != null)
                {
                    currentNode.Value = text;
                }
            }
        }
예제 #26
0
 public void Error(int size,
                   ConfigNodeSubType subType, 
                   ConfigNodeType nType, 
                   int terminal, 
                   [MarshalAs(UnmanagedType.LPWStr)]String text, 
                   int textLength, 
                   int prefixLength)
 {
     //Trace("Error",size,subType,nType,terminal,text,textLength,prefixLength,0);                        
 }
예제 #27
0
 public abstract void CreateAttribute(int size,
                      ConfigNodeSubType subType,
                      ConfigNodeType nType,
                      int terminal,
                      [MarshalAs(UnmanagedType.LPWStr)]String text,
                      int textLength,
                      int prefixLength);
		public override void CreateNode(int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength)
		{
			if (nType != ConfigNodeType.Element)
			{
				if (nType == ConfigNodeType.PCData && this.currentNode != null)
				{
					this.currentNode.Value = text;
				}
				return;
			}
			this.lastProcessed = "<" + text + ">";
			if (!this.parsing && (!this.bNoSearchPath || string.Compare(text, this.treeRootPath[0], StringComparison.OrdinalIgnoreCase) != 0) && (this.depth != this.searchDepth || this.searchDepth != this.pathDepth || string.Compare(text, this.treeRootPath[this.pathDepth], StringComparison.OrdinalIgnoreCase) != 0))
			{
				this.depth++;
				return;
			}
			this.parsing = true;
			ConfigNode configNode = this.currentNode;
			this.currentNode = new ConfigNode(text, configNode);
			if (this.rootNode == null)
			{
				this.rootNode = this.currentNode;
				return;
			}
			configNode.AddChild(this.currentNode);
		}
예제 #29
0
 public override void EndChildren(int fEmpty, int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength)
 {
     this.lastProcessed           = text;
     this.lastProcessedEndElement = true;
     if (this.parsing)
     {
         if (this.currentNode == this.rootNode)
         {
             this.parsing = false;
         }
         this.currentNode = this.currentNode.Parent;
     }
     else
     {
         if (nType != ConfigNodeType.Element)
         {
             return;
         }
         if (this.depth == this.searchDepth && string.Compare(text, this.treeRootPath[this.searchDepth - 1], StringComparison.Ordinal) == 0)
         {
             this.searchDepth = this.searchDepth - 1;
             this.depth       = this.depth - 1;
         }
         else
         {
             this.depth = this.depth - 1;
         }
     }
 }
예제 #30
0
 public override void Error(int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength)
 {
 }
예제 #31
0
 private void Trace(string name, int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength, int fEmpty)
 {
 }
예제 #32
0
 public void Error(int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength)
 {
 }
		public override void CreateAttribute(int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength)
		{
			if (!this.parsing)
			{
				return;
			}
			if (nType == ConfigNodeType.Attribute)
			{
				this.attributeEntry = this.currentNode.AddAttribute(text, "");
				this.key = text;
				return;
			}
			if (nType == ConfigNodeType.PCData)
			{
				this.currentNode.ReplaceAttribute(this.attributeEntry, this.key, text);
				return;
			}
			string resourceString = Environment.GetResourceString("XML_Syntax_InvalidSyntaxInFile", new object[]
			{
				this.fileName, 
				this.lastProcessed
			});
			throw new ApplicationException(resourceString);
		}
예제 #34
0
        public void EndChildren(int fEmpty, 
                                int size,
                                ConfigNodeSubType subType, 
                                ConfigNodeType nType,                               
                                int terminal, 
                                [MarshalAs(UnmanagedType.LPWStr)] String text, 
                                int textLength, 
                                int prefixLength)
        {
            lastProcessed = "</"+text+">";          
            if (parsing)
            {
                //Trace("EndChildren",size,subType,nType,terminal,text,textLength,prefixLength,fEmpty);

                if (currentNode == rootNode)
                {
                    // End of section of tree which is parsed
                    parsing = false;
                }

                currentNode = currentNode.Parent;
            }
            else if (nType == ConfigNodeType.Element){
                if(depth == searchDepth && String.Compare(text, treeRootPath[searchDepth - 1], StringComparison.Ordinal) == 0)
                {
                    searchDepth--;
                    depth--;
                }
                else 
                    depth--;
            }
            
        }
예제 #35
0
 private void Trace(string name, int size, ConfigNodeSubType subType, ConfigNodeType nType, int terminal, [MarshalAs(UnmanagedType.LPWStr)] string text, int textLength, int prefixLength, int fEmpty)
 {
 }
예제 #36
0
 public void BeginChildren(int size,
                           ConfigNodeSubType subType, 
                           ConfigNodeType nType,                                   
                           int terminal, 
                           [MarshalAs(UnmanagedType.LPWStr)] String text, 
                           int textLength, 
                           int prefixLength)
 {
     //Trace("BeginChildren",size,subType,nType,terminal,text,textLength,prefixLength,0);
     if (!parsing &&
         (!bNoSearchPath 
          && depth == (searchDepth + 1)
          && String.Compare(text, treeRootPath[searchDepth], StringComparison.Ordinal) == 0))
     {
         searchDepth++;
     }
 }
예제 #37
0
 public abstract void EndChildren(int fEmpty,
                  int size,
                  ConfigNodeSubType subType,
                  ConfigNodeType nType,
                  int terminal,
                  [MarshalAs(UnmanagedType.LPWStr)] String text,
                  int textLength,
                  int prefixLength);