Esempio n. 1
0
        //
        // CONSTRUCTOR
        //
        public NetworkSource(IXPathNavigable path) : base(path)
        {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <ID></ID>
            XPathNavigator navigatorID = navigator.SelectSingleNode("ID");

            if (navigatorID != null)
            {
                this._id = navigatorID.ValueAsInt;
            }

            // <ClassID></ClassID>
            XPathNavigator navigatorClassID = navigator.SelectSingleNode("ClassID");

            if (navigatorClassID != null)
            {
                this._classId = navigatorClassID.ValueAsInt;
            }

            // <Name></Name>
            XPathNavigator navigatorName = navigator.SelectSingleNode("Name");

            if (navigatorName != null)
            {
                this._name = navigatorName.Value;
            }

            // <ElementType></ElementType>
            XPathNavigator navigatorElementType = navigator.SelectSingleNode("ElementType");

            if (navigatorElementType != null)
            {
                this._elementType = (esriNetworkElementType)Enum.Parse(typeof(esriNetworkElementType), navigatorElementType.Value, true);
            }

            // <Properties><Property><Property><Properties>
            this._properties = new List <Property>();
            XPathNodeIterator interatorProperty = navigator.Select("Properties/Property");

            while (interatorProperty.MoveNext())
            {
                // Get <Property>
                XPathNavigator navigatorProperty = interatorProperty.Current;

                // Add Property
                Property property = new Property(navigatorProperty);
                this._properties.Add(property);
            }

            // <NetworkSourceDirections>
            XPathNavigator navigatorNetworkSourceDirections = navigator.SelectSingleNode("NetworkSourceDirections");

            if (navigatorNetworkSourceDirections != null)
            {
                this._networkSourceDirections = new NetworkSourceDirections(navigatorNetworkSourceDirections);
            }
        }
Esempio n. 2
0
 public NetworkSource(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     this._id                      = info.GetInt32("id");
     this._classId                 = info.GetInt32("classId");
     this._name                    = info.GetString("name");
     this._elementType             = (esriNetworkElementType)Enum.Parse(typeof(esriNetworkElementType), info.GetString("elementType"), true);
     this._properties              = (List <Property>)info.GetValue("properties", typeof(List <Property>));
     this._networkSourceDirections = (NetworkSourceDirections)info.GetValue("networkSourceDirections", typeof(NetworkSourceDirections));
 }
 public NetworkSourceDirections(NetworkSourceDirections prototype) : base(prototype)
 {
     this._adminAreaFieldName = prototype.AdminAreaFieldName;
     this._shields            = (Shields)prototype.Shields.Clone();
     this._streetNameFields   = new List <StreetNameFields>();
     foreach (StreetNameFields streetNameFields in prototype.StreetNameFieldsCollection)
     {
         StreetNameFields streetNameFieldsClone = (StreetNameFields)streetNameFields.Clone();
         this._streetNameFields.Add(streetNameFieldsClone);
     }
 }
Esempio n. 4
0
 public NetworkSource(NetworkSource prototype) : base(prototype)
 {
     this._id          = prototype.ID;
     this._classId     = prototype.ClassId;
     this._name        = prototype.Name;
     this._elementType = prototype.ElementType;
     this._properties  = new List <Property>();
     foreach (Property property in prototype.PropertyCollection)
     {
         Property propertyClone = (Property)property.Clone();
         this._properties.Add(propertyClone);
     }
     if (prototype.NetworkSourceDirections != null)
     {
         this._networkSourceDirections = (NetworkSourceDirections)prototype.NetworkSourceDirections.Clone();
     }
 }
 public NetworkSourceDirections(NetworkSourceDirections prototype) : base(prototype) {
     this._adminAreaFieldName = prototype.AdminAreaFieldName;
     this._shields = (Shields)prototype.Shields.Clone();
     this._streetNameFields = new List<StreetNameFields>();
     foreach (StreetNameFields streetNameFields in prototype.StreetNameFieldsCollection) {
         StreetNameFields streetNameFieldsClone = (StreetNameFields)streetNameFields.Clone();
         this._streetNameFields.Add(streetNameFieldsClone);
     }
 }
 public NetworkSource(SerializationInfo info, StreamingContext context) : base(info, context) {
     this._id = info.GetInt32("id");
     this._classId = info.GetInt32("classId");
     this._name = info.GetString("name");
     this._elementType = (esriNetworkElementType)Enum.Parse(typeof(esriNetworkElementType), info.GetString("elementType"), true);
     this._properties = (List<Property>)info.GetValue("properties", typeof(List<Property>));
     this._networkSourceDirections = (NetworkSourceDirections)info.GetValue("networkSourceDirections", typeof(NetworkSourceDirections));
 }
        //
        // CONSTRUCTOR
        //
        public NetworkSource(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <ID></ID>
            XPathNavigator navigatorID = navigator.SelectSingleNode("ID");
            if (navigatorID != null) {
                this._id = navigatorID.ValueAsInt;
            }

            // <ClassID></ClassID>
            XPathNavigator navigatorClassID = navigator.SelectSingleNode("ClassID");
            if (navigatorClassID != null) {
                this._classId = navigatorClassID.ValueAsInt;
            }

            // <Name></Name>
            XPathNavigator navigatorName = navigator.SelectSingleNode("Name");
            if (navigatorName != null) {
                this._name = navigatorName.Value;
            }

            // <ElementType></ElementType>
            XPathNavigator navigatorElementType = navigator.SelectSingleNode("ElementType");
            if (navigatorElementType != null) {
                this._elementType = (esriNetworkElementType)Enum.Parse(typeof(esriNetworkElementType), navigatorElementType.Value, true);
            }

            // <Properties><Property><Property><Properties>
            this._properties = new List<Property>();
            XPathNodeIterator interatorProperty = navigator.Select("Properties/Property");
            while (interatorProperty.MoveNext()) {
                // Get <Property>
                XPathNavigator navigatorProperty = interatorProperty.Current;

                // Add Property
                Property property = new Property(navigatorProperty);
                this._properties.Add(property);
            }

            // <NetworkSourceDirections>
            XPathNavigator navigatorNetworkSourceDirections = navigator.SelectSingleNode("NetworkSourceDirections");
            if (navigatorNetworkSourceDirections != null) {
                this._networkSourceDirections = new NetworkSourceDirections(navigatorNetworkSourceDirections);
            }
        }
 public NetworkSource(NetworkSource prototype) : base(prototype) {
     this._id = prototype.ID;
     this._classId = prototype.ClassId;
     this._name = prototype.Name;
     this._elementType = prototype.ElementType;
     this._properties = new List<Property>();
     foreach (Property property in prototype.PropertyCollection) {
         Property propertyClone = (Property)property.Clone();
         this._properties.Add(propertyClone);
     }
     if (prototype.NetworkSourceDirections != null) {
         this._networkSourceDirections = (NetworkSourceDirections)prototype.NetworkSourceDirections.Clone();
     }
 }