Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/SharpVectorDom/Conversion.cs @ 12984

Last change on this file since 12984 was 12762, checked in by aballeit, 9 years ago

#2283 GUI updates, Tree-chart, MCTS Version 2 (prune leaves)

File size: 610 bytes
Line 
1using System;
2using System.Xml;
3
4namespace SharpVectors.Dom
5{
6  /// <summary>
7  /// Summary description for Conversion.
8  /// </summary>
9  internal static class Conversion
10  {
11    internal static INode Cast(XmlNode node)
12    {
13      try
14      {
15        return (INode)node;
16      }
17      catch (InvalidCastException)
18      {
19        throw new DomException(DomExceptionType.WrongDocumentErr);
20      }
21    }
22   
23    internal static XmlNode Cast(INode node)
24    {
25      try
26      {
27        return (XmlNode)node;
28      }
29      catch (InvalidCastException)
30      {
31        throw new DomException(DomExceptionType.WrongDocumentErr);
32      }
33    }
34  }
35}
Note: See TracBrowser for help on using the repository browser.