User Tools

Site Tools


thinkgeo.mapsuite.routing.routingsource

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
thinkgeo.mapsuite.routing.routingsource [2015/09/18 03:06]
admin
thinkgeo.mapsuite.routing.routingsource [2017/03/16 21:59] (current)
Line 1: Line 1:
 ====== ThinkGeo.MapSuite.Routing.RoutingSource ====== ====== ThinkGeo.MapSuite.Routing.RoutingSource ======
 +
 +{{section>​upgrade_map_suite_to_10.0}}
 +
 This class is the base class for all types of RoutingSource. This class is the base class for all types of RoutingSource.
 ===== Inheritance Hierarchy ===== ===== Inheritance Hierarchy =====
Line 10: Line 13:
 ** {{wiki:​ProtectedMethod.gif|}} RoutingSource() ** ** {{wiki:​ProtectedMethod.gif|}} RoutingSource() **
  
-This is the default constructor for the abstract RoutingSource class.+  * //This is the default constructor for the abstract RoutingSource class.//
 == Remarks == == Remarks ==
-As this method is protected, you may only add code to this method if you override it from an inheriting class.+  * //As this method is protected, you may only add code to this method if you override it from an inheriting class.//
 == Parameters == == Parameters ==
 <div newline></​div>​ <div newline></​div>​
Line 18: Line 21:
 ** {{wiki:​PublicMethod.gif|}} GetRouteSegmentCount() ** ** {{wiki:​PublicMethod.gif|}} GetRouteSegmentCount() **
  
-This method returns the count of the number of records in this RoutingSource.+  * //This method returns the count of the number of records in this RoutingSource.//
 == Remarks == == Remarks ==
-This method is the concrete wrapper for the virtual method GetRouteSegmentCountCore. It will return whatever is returned by the GetRouteSegmentCountCore method, along with any additions or subtractions made if you are in a transaction and that transaction is configured to be live. To determine what the default implementation of the virtual GetRouteSegmentCountCore method is, please see the documentation for it. The default implementation of GetRouteSegmentCountCore returns 0. We strongly recommend that you provide your own implementation for this method.+  * //This method is the concrete wrapper for the virtual method GetRouteSegmentCountCore. It will return whatever is returned by the GetRouteSegmentCountCore method, along with any additions or subtractions made if you are in a transaction and that transaction is configured to be live. To determine what the default implementation of the virtual GetRouteSegmentCountCore method is, please see the documentation for it. The default implementation of GetRouteSegmentCountCore returns 0. We strongly recommend that you provide your own implementation for this method.//
  
 == Return Value == == Return Value ==
Line 30: Line 33:
 ** {{wiki:​PublicMethod.gif|}} Open() ** ** {{wiki:​PublicMethod.gif|}} Open() **
  
-This method opens the RoutingSource so that it is initialized and ready to use.+  * //This method opens the RoutingSource so that it is initialized and ready to use.//
 == Remarks == == Remarks ==
-This method is the concrete wrapper for the abstract method OpenCore. The Open method plays an important role, as it is responsible for initializing the RoutingSource. Most methods on the RoutingSource will throw an exception if the state of the RoutingSource is not opened. When the map draws each layer, it will open the RoutingSource as one of its first steps, then after it is finished drawing with that layer it will close it. In this way we are sure to release all resources used by the RoutingSource. When implementing this method, consider opening files for file-based sources, connecting to databases in the database-based sources and so on. You will get a chance to close these in the Close method of the RoutingSource. As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.+  * //This method is the concrete wrapper for the abstract method OpenCore. The Open method plays an important role, as it is responsible for initializing the RoutingSource. Most methods on the RoutingSource will throw an exception if the state of the RoutingSource is not opened. When the map draws each layer, it will open the RoutingSource as one of its first steps, then after it is finished drawing with that layer it will close it. In this way we are sure to release all resources used by the RoutingSource. When implementing this method, consider opening files for file-based sources, connecting to databases in the database-based sources and so on. You will get a chance to close these in the Close method of the RoutingSource. As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.//
  
 == Return Value == == Return Value ==
   * Type:Void   * Type:Void
-  * Description:​None+  * Description:​N/A
  
 == Parameters == == Parameters ==
Line 42: Line 45:
 ** {{wiki:​PublicMethod.gif|}} Close() ** ** {{wiki:​PublicMethod.gif|}} Close() **
  
-This method closes the RoutingSource and releases any resources it was using.+  * //This method closes the RoutingSource and releases any resources it was using.//
 == Remarks == == Remarks ==
-This method is the concrete wrapper for the abstract method CloseCore. The Close method plays an important role in the life cycle of the RoutingSource. It may be called after drawing to release any memory and other resources that were allocated since the Open method was called. If you override the Core version of this method, it is recommended that you take the following things into account: This method may be called multiple times, so we suggest you write the method so that a call to a closed RoutingSource is ignored and does not generate an error. We also suggest that in the Close you free all resources that have been opened. Remember that the object will not be destroyed, but will be re-opened possibly in the near future.+  * //This method is the concrete wrapper for the abstract method CloseCore. The Close method plays an important role in the life cycle of the RoutingSource. It may be called after drawing to release any memory and other resources that were allocated since the Open method was called. If you override the Core version of this method, it is recommended that you take the following things into account: This method may be called multiple times, so we suggest you write the method so that a call to a closed RoutingSource is ignored and does not generate an error. We also suggest that in the Close you free all resources that have been opened. Remember that the object will not be destroyed, but will be re-opened possibly in the near future.//
  
 == Return Value == == Return Value ==
   * Type:Void   * Type:Void
-  * Description:​None+  * Description:​N/A
  
 == Parameters == == Parameters ==
Line 54: Line 57:
 ** {{wiki:​PublicMethod.gif|}} GetRouteSegmentByFeatureId(String) ** ** {{wiki:​PublicMethod.gif|}} GetRouteSegmentByFeatureId(String) **
  
-This method returns a RouteSegment by providing its ID in the RoutingSource.+  * //This method returns a RouteSegment by providing its ID in the RoutingSource.//
 == Remarks == == Remarks ==
-N/A+  * //For the most updated Info for this topic, please check it here:​http:​wiki.thinkgeo.com/​wiki/​ThinkGeo.MapSuite.Routing.RoutingSource#​GetRouteSegmentByFeatureId.28String.29/​/
  
 == Return Value == == Return Value ==
Line 70: Line 73:
 ** {{wiki:​PublicMethod.gif|}} GetRouteSegmentsNearestTo(BaseShape,​FeatureSource,​GeographyUnit,​Int32) ** ** {{wiki:​PublicMethod.gif|}} GetRouteSegmentsNearestTo(BaseShape,​FeatureSource,​GeographyUnit,​Int32) **
  
-This method returns a user defined number of Route Segments that are closest to the TargetShape.+  * //This method returns a user defined number of Route Segments that are closest to the TargetShape.//
 == Remarks == == Remarks ==
-This method returns a user defined number of Route Segments that are closest to the TargetShape. It is important to note that the TargetShape and the FeatureSource must use the same unit, such as feet or meters. If they do not, then the results will not be predictable or correct.+  * //This method returns a user defined number of Route Segments that are closest to the TargetShape. It is important to note that the TargetShape and the FeatureSource must use the same unit, such as feet or meters. If they do not, then the results will not be predictable or correct.//
  
 == Return Value == == Return Value ==
Line 98: Line 101:
 ** {{wiki:​PublicMethod.gif|}} BeginTransaction() ** ** {{wiki:​PublicMethod.gif|}} BeginTransaction() **
  
-This method starts a new transaction if the RoutingSource allows editing+  * //This method starts a new transaction if the RoutingSource allows editing//
 == Remarks == == Remarks ==
-This method is used to start a transaction,​ assuming that the RoutingSource allows editing. There are some additional prerequisites to beginning a transaction,​ such as ensuring that a transaction is not already in progress. You must also be sure that the RoutingSource has been opened. The Transaction System You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the RouteSegment are stored in memory only. If for any reason you choose to abandon the transaction,​ you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction,​ you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific RoutingSource is responsible for integrating your changes into the underlying RoutingSource.+  * //This method is used to start a transaction,​ assuming that the RoutingSource allows editing. There are some additional prerequisites to beginning a transaction,​ such as ensuring that a transaction is not already in progress. You must also be sure that the RoutingSource has been opened. The Transaction System You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the RouteSegment are stored in memory only. If for any reason you choose to abandon the transaction,​ you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction,​ you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific RoutingSource is responsible for integrating your changes into the underlying RoutingSource.//
  
 == Return Value == == Return Value ==
   * Type:Void   * Type:Void
-  * Description:​None+  * Description:​N/A
  
 == Parameters == == Parameters ==
Line 110: Line 113:
 ** {{wiki:​PublicMethod.gif|}} CommitTransaction() ** ** {{wiki:​PublicMethod.gif|}} CommitTransaction() **
  
-This method will commit the existing transaction to its underlying source of data.+  * //This method will commit the existing transaction to its underlying source of data.//
 == Remarks == == Remarks ==
-This method is the concrete wrapper for the virtual method CommitTransactionCore. As this is the concrete version, the real work is done in the Core version of the method. It will commit the existing transaction to its underlying source of data. It will then pass back the results of the commit, including any error(s) received. Lastly, it will free up the internal memory cache of any RoutSegments added, updated or deleted. You will need to ensure that you have started a transaction by calling BeginTransaction.+  * //This method is the concrete wrapper for the virtual method CommitTransactionCore. As this is the concrete version, the real work is done in the Core version of the method. It will commit the existing transaction to its underlying source of data. It will then pass back the results of the commit, including any error(s) received. Lastly, it will free up the internal memory cache of any RoutSegments added, updated or deleted. You will need to ensure that you have started a transaction by calling BeginTransaction.//
  
 == Return Value == == Return Value ==
Line 122: Line 125:
 ** {{wiki:​PublicMethod.gif|}} RollbackTransaction() ** ** {{wiki:​PublicMethod.gif|}} RollbackTransaction() **
  
-This method will cancel an existing transaction. It will free up the internal memory cache of any InternalFeatures added, updated or deleted.+  * //This method will cancel an existing transaction. It will free up the internal memory cache of any InternalFeatures added, updated or deleted.//
 == Remarks == == Remarks ==
-This method will cancel an existing transaction. It will free up the internal memory cache of any RoutingSegments added, updated or deleted. You will need to ensure that you have started a transaction by calling BeginTransaction.The Transaction System You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the RouteSegment are stored in memory only. If for any reason you choose to abandon the transaction,​ you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction,​ you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific RoutingSource is responsible for integrating your changes into the underlying RoutingSource.+  * //This method will cancel an existing transaction. It will free up the internal memory cache of any RoutingSegments added, updated or deleted. You will need to ensure that you have started a transaction by calling BeginTransaction. The Transaction System You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the RouteSegment are stored in memory only. If for any reason you choose to abandon the transaction,​ you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction,​ you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific RoutingSource is responsible for integrating your changes into the underlying RoutingSource.//
  
 == Return Value == == Return Value ==
   * Type:Void   * Type:Void
-  * Description:​None+  * Description:​N/A
  
 == Parameters == == Parameters ==
Line 134: Line 137:
 ** {{wiki:​PublicMethod.gif|}} AddRouteSegment(RouteSegment) ** ** {{wiki:​PublicMethod.gif|}} AddRouteSegment(RouteSegment) **
  
-This method adds a new RouteSegment to an existing transaction.+  * //This method adds a new RouteSegment to an existing transaction.//
 == Remarks == == Remarks ==
-This method adds a new RouteSegment to an existing transaction. You will need to ensure that you have started a transaction by calling BeginTransaction. The Transaction System You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the RouteSegment are stored in memory only. If for any reason you choose to abandon the transaction,​ you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction,​ you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific RoutingSource is responsible for integrating your changes into the underlying RoutingSource.+  * //This method adds a new RouteSegment to an existing transaction. You will need to ensure that you have started a transaction by calling BeginTransaction. The Transaction System You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the RouteSegment are stored in memory only. If for any reason you choose to abandon the transaction,​ you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction,​ you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific RoutingSource is responsible for integrating your changes into the underlying RoutingSource.//
  
 == Return Value == == Return Value ==
Line 150: Line 153:
 ** {{wiki:​PublicMethod.gif|}} UpdateRouteSegment(RouteSegment) ** ** {{wiki:​PublicMethod.gif|}} UpdateRouteSegment(RouteSegment) **
  
-This method deletes a RouteSegment from an existing transaction.+  * //This method deletes a RouteSegment from an existing transaction.//
 == Remarks == == Remarks ==
-This method update a RouteSegment to an existing transaction. You will need to ensure that you have started a transaction by calling BeginTransaction. The Transaction System You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the RouteSegment are stored in memory only. If for any reason you choose to abandon the transaction,​ you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction,​ you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific RoutingSource is responsible for integrating your changes into the underlying RoutingSource.+  * //This method update a RouteSegment to an existing transaction. You will need to ensure that you have started a transaction by calling BeginTransaction. The Transaction System You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the RouteSegment are stored in memory only. If for any reason you choose to abandon the transaction,​ you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction,​ you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific RoutingSource is responsible for integrating your changes into the underlying RoutingSource.//
  
 == Return Value == == Return Value ==
   * Type:Void   * Type:Void
-  * Description:​None+  * Description:​N/A
  
 == Parameters == == Parameters ==
Line 166: Line 169:
 ** {{wiki:​PublicMethod.gif|}} DeleteRouteSegment(String) ** ** {{wiki:​PublicMethod.gif|}} DeleteRouteSegment(String) **
  
-This method deletes a RouteSegment from an existing transaction.+  * //This method deletes a RouteSegment from an existing transaction.//
 == Remarks == == Remarks ==
-This method delete a RouteSegment from an existing transaction. You will need to ensure that you have started a transaction by calling BeginTransaction. The Transaction System You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the RouteSegment are stored in memory only. If for any reason you choose to abandon the transaction,​ you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction,​ you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific RoutingSource is responsible for integrating your changes into the underlying RoutingSource.+  * //This method delete a RouteSegment from an existing transaction. You will need to ensure that you have started a transaction by calling BeginTransaction. The Transaction System You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the RouteSegment are stored in memory only. If for any reason you choose to abandon the transaction,​ you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction,​ you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific RoutingSource is responsible for integrating your changes into the underlying RoutingSource.//
  
 == Return Value == == Return Value ==
   * Type:Void   * Type:Void
-  * Description:​None+  * Description:​N/A
  
 == Parameters == == Parameters ==
Line 182: Line 185:
 ** {{wiki:​PublicMethod.gif|}} ToString() ** ** {{wiki:​PublicMethod.gif|}} ToString() **
  
-N/A+  * //N/A//
 == Remarks == == Remarks ==
-N/A+  * //For the most updated Info for this topic, please check it here:​http:​wiki.thinkgeo.com/​wiki/​ThinkGeo.MapSuite.Routing.RoutingSource#​ToString.28.29/​/
  
 == Return Value == == Return Value ==
Line 194: Line 197:
 ** {{wiki:​PublicMethod.gif|}} Equals(Object) ** ** {{wiki:​PublicMethod.gif|}} Equals(Object) **
  
-N/A+  * //N/A//
 == Remarks == == Remarks ==
-N/A+  * //For the most updated Info for this topic, please check it here:​http:​wiki.thinkgeo.com/​wiki/​ThinkGeo.MapSuite.Routing.RoutingSource#​Equals.28Object.29/​/
  
 == Return Value == == Return Value ==
Line 210: Line 213:
 ** {{wiki:​PublicMethod.gif|}} GetHashCode() ** ** {{wiki:​PublicMethod.gif|}} GetHashCode() **
  
-N/A+  * //N/A//
 == Remarks == == Remarks ==
-N/A+  * //For the most updated Info for this topic, please check it here:​http:​wiki.thinkgeo.com/​wiki/​ThinkGeo.MapSuite.Routing.RoutingSource#​GetHashCode.28.29/​/
  
 == Return Value == == Return Value ==
Line 222: Line 225:
 ** {{wiki:​PublicMethod.gif|}} GetType() ** ** {{wiki:​PublicMethod.gif|}} GetType() **
  
-N/A+  * //N/A//
 == Remarks == == Remarks ==
-N/A+  * //For the most updated Info for this topic, please check it here:​http:​wiki.thinkgeo.com/​wiki/​ThinkGeo.MapSuite.Routing.RoutingSource#​GetType.28.29/​/
  
 == Return Value == == Return Value ==
Line 235: Line 238:
 ** {{wiki:​ProtectedMethod.gif|}} OnCommittingTransaction(RoutingCommittingTransactionEventArgs) ** ** {{wiki:​ProtectedMethod.gif|}} OnCommittingTransaction(RoutingCommittingTransactionEventArgs) **
  
-This method allows you to raise the CommittingTransaction event from a derived class.+  * //This method allows you to raise the CommittingTransaction event from a derived class.//
 == Remarks == == Remarks ==
-You can call this method from a derived class to enable it to raise the CommittingTransaction event. This may be useful if you plan to extend the RoutingSource and you need access to the event. Details on the event: This event is raised before the CommitTransactionCore is called and allows you access to the TransactionBuffer before the transaction is committed. It also allows you to cancel the pending transaction. The TransactionBuffer is the object that stores all of the pending transactions and is accessible through this event to allow you either add, remove or modify transactions. In the event that you cancel the CommitTransaction method, the transaction remains intact and you will still be editing. This makes it a nice place to possibly check for connectivity before the TransactionCore code is run, which is where the records are actually committed. Calling the RollBackTransaction method is the only way to permanently cancel a pending transaction without committing it.+  * //You can call this method from a derived class to enable it to raise the CommittingTransaction event. This may be useful if you plan to extend the RoutingSource and you need access to the event. Details on the event: This event is raised before the CommitTransactionCore is called and allows you access to the TransactionBuffer before the transaction is committed. It also allows you to cancel the pending transaction. The TransactionBuffer is the object that stores all of the pending transactions and is accessible through this event to allow you either add, remove or modify transactions. In the event that you cancel the CommitTransaction method, the transaction remains intact and you will still be editing. This makes it a nice place to possibly check for connectivity before the TransactionCore code is run, which is where the records are actually committed. Calling the RollBackTransaction method is the only way to permanently cancel a pending transaction without committing it.//
  
 == Return Value == == Return Value ==
   * Type:Void   * Type:Void
-  * Description:​None+  * Description:​N/A
  
 == Parameters == == Parameters ==
Line 251: Line 254:
 ** {{wiki:​ProtectedMethod.gif|}} OnCommittedTransaction(RoutingCommittedTransactionEventArgs) ** ** {{wiki:​ProtectedMethod.gif|}} OnCommittedTransaction(RoutingCommittedTransactionEventArgs) **
  
-This method allows you to raise the CommittedTransaction event from a derived class.+  * //This method allows you to raise the CommittedTransaction event from a derived class.//
 == Remarks == == Remarks ==
-You can call this method from a derived class to enable it to raise the CommittedTransaction event. This may be useful if you plan to extend the RoutingSource and you need access to the event. Details on the event:This event is raised after the CommitTransactionCore is called and allows you access to the TransactionBuffer and the TransactionResults object before CommitTransaction method is returned. With this event, you can analyze the results of the transaction and do any cleanup code necessary. In the event some of the records did not commit, you can handle these items here. The TransactionResults object is passed out of the CommitTransaction method so you could analyze it then; however, this is the only place where you have access to both the TransactionResults object and the TransactionBuffer object at the same time. These are useful together to try and determine what went wrong and possibly try and re-commit them. At the time of this event, you will technically be out of the current transaction.+  * //You can call this method from a derived class to enable it to raise the CommittedTransaction event. This may be useful if you plan to extend the RoutingSource and you need access to the event. Details on the event: This event is raised after the CommitTransactionCore is called and allows you access to the TransactionBuffer and the TransactionResults object before CommitTransaction method is returned. With this event, you can analyze the results of the transaction and do any cleanup code necessary. In the event some of the records did not commit, you can handle these items here. The TransactionResults object is passed out of the CommitTransaction method so you could analyze it then; however, this is the only place where you have access to both the TransactionResults object and the TransactionBuffer object at the same time. These are useful together to try and determine what went wrong and possibly try and re-commit them. At the time of this event, you will technically be out of the current transaction.//
  
 == Return Value == == Return Value ==
   * Type:Void   * Type:Void
-  * Description:​None+  * Description:​N/A
  
 == Parameters == == Parameters ==
Line 267: Line 270:
 ** {{wiki:​ProtectedMethod.gif|}} GetRouteSegmentCountCore() ** ** {{wiki:​ProtectedMethod.gif|}} GetRouteSegmentCountCore() **
  
-This method returns the count of the number of records in this RoutingSource.+  * //This method returns the count of the number of records in this RoutingSource.//
 == Remarks == == Remarks ==
-This protected virtual method is called from the concrete public method GetCount. It does not take into account any transaction activity, as this is the responsibility of the concrete public method GetRouteSegmentCount. This way, as a developer, if you choose to override this method you do not have to consider transactions at all. The default implementation of GetRouteSegmentCountCore returns 0. We strongly recommend that you provide your own implementation for this method.+  * //This protected virtual method is called from the concrete public method GetCount. It does not take into account any transaction activity, as this is the responsibility of the concrete public method GetRouteSegmentCount. This way, as a developer, if you choose to override this method you do not have to consider transactions at all. The default implementation of GetRouteSegmentCountCore returns 0. We strongly recommend that you provide your own implementation for this method.//
  
 == Return Value == == Return Value ==
Line 279: Line 282:
 ** {{wiki:​ProtectedMethod.gif|}} OpenCore() ** ** {{wiki:​ProtectedMethod.gif|}} OpenCore() **
  
-This method opens the RoutingSource so that it is initialized and ready to use.+  * //This method opens the RoutingSource so that it is initialized and ready to use.//
 == Remarks == == Remarks ==
-This protected virtual method is called from the concrete public method Open. The Open method plays an important role, as it is responsible for initializing the RoutingSource. Most methods on the RoutingSource will throw an exception if the state of the RoutingSource is not opened. When the map draws each layer, it will open the RoutingSource as one of its first steps, then after it is finished drawing with that layer it will close it. In this way we are sure to release all resources used by the RoutingSource. When implementing this virtual method, consider opening files for file-based sources, connecting to databases in the database-based sources and so on. You will get a chance to close these in the Close method of the RoutingSource.+  * //This protected virtual method is called from the concrete public method Open. The Open method plays an important role, as it is responsible for initializing the RoutingSource. Most methods on the RoutingSource will throw an exception if the state of the RoutingSource is not opened. When the map draws each layer, it will open the RoutingSource as one of its first steps, then after it is finished drawing with that layer it will close it. In this way we are sure to release all resources used by the RoutingSource. When implementing this virtual method, consider opening files for file-based sources, connecting to databases in the database-based sources and so on. You will get a chance to close these in the Close method of the RoutingSource.//
  
 == Return Value == == Return Value ==
   * Type:Void   * Type:Void
-  * Description:​None+  * Description:​N/A
  
 == Parameters == == Parameters ==
Line 291: Line 294:
 ** {{wiki:​ProtectedMethod.gif|}} CloseCore() ** ** {{wiki:​ProtectedMethod.gif|}} CloseCore() **
  
-This method closes the RoutingSource and releases any resources it was using.+  * //This method closes the RoutingSource and releases any resources it was using.//
 == Remarks == == Remarks ==
-This protected virtual method is called from the concrete public method Close. The Close method plays an important role in the life cycle of the RoutingSource. It may be called after drawing to release any memory and other resources that were allocated since the Open method was called. If you override this method, it is recommended that you take the following things into account: This method may be called multiple times, so we suggest you write the method so that that a call to a closed RoutingSource is ignored and does not generate an error. We also suggest that in the Close you free all resources that have been opened. Remember that the object will not be destroyed, but will be re-opened possibly in the near future.+  * //This protected virtual method is called from the concrete public method Close. The Close method plays an important role in the life cycle of the RoutingSource. It may be called after drawing to release any memory and other resources that were allocated since the Open method was called. If you override this method, it is recommended that you take the following things into account: This method may be called multiple times, so we suggest you write the method so that that a call to a closed RoutingSource is ignored and does not generate an error. We also suggest that in the Close you free all resources that have been opened. Remember that the object will not be destroyed, but will be re-opened possibly in the near future.//
  
 == Return Value == == Return Value ==
   * Type:Void   * Type:Void
-  * Description:​None+  * Description:​N/A
  
 == Parameters == == Parameters ==
Line 303: Line 306:
 ** {{wiki:​ProtectedMethod.gif|}} GetRouteSegmentByFeatureIdCore(String) ** ** {{wiki:​ProtectedMethod.gif|}} GetRouteSegmentByFeatureIdCore(String) **
  
-This method returns a RouteSegment by providing its ID in the RoutingSource.+  * //This method returns a RouteSegment by providing its ID in the RoutingSource.//
 == Remarks == == Remarks ==
-N/A+  * //For the most updated Info for this topic, please check it here:​http:​wiki.thinkgeo.com/​wiki/​ThinkGeo.MapSuite.Routing.RoutingSource#​GetRouteSegmentByFeatureIdCore.28String.29/​/
  
 == Return Value == == Return Value ==
Line 319: Line 322:
 ** {{wiki:​ProtectedMethod.gif|}} GetRouteSegmentsNearestToCore(BaseShape,​FeatureSource,​GeographyUnit,​Int32) ** ** {{wiki:​ProtectedMethod.gif|}} GetRouteSegmentsNearestToCore(BaseShape,​FeatureSource,​GeographyUnit,​Int32) **
  
-This method returns a user defined number of Route Segments that are closest to the TargetShape.+  * //This method returns a user defined number of Route Segments that are closest to the TargetShape.//
 == Remarks == == Remarks ==
-This method returns a user defined number of Route Segments that are closest to the TargetShape. It is important to note that the TargetShape and the FeatureSource must use the same unit, such as feet or meters. If they do not, then the results will not be predictable or correct.+  * //This method returns a user defined number of Route Segments that are closest to the TargetShape. It is important to note that the TargetShape and the FeatureSource must use the same unit, such as feet or meters. If they do not, then the results will not be predictable or correct.//
  
 == Return Value == == Return Value ==
Line 347: Line 350:
 ** {{wiki:​ProtectedMethod.gif|}} BeginTransactionCore() ** ** {{wiki:​ProtectedMethod.gif|}} BeginTransactionCore() **
  
-N/A+  * //N/A//
 == Remarks == == Remarks ==
-N/A+  * //For the most updated Info for this topic, please check it here:​http:​wiki.thinkgeo.com/​wiki/​ThinkGeo.MapSuite.Routing.RoutingSource#​BeginTransactionCore.28.29/​/
  
 == Return Value == == Return Value ==
Line 359: Line 362:
 ** {{wiki:​ProtectedMethod.gif|}} CommitTransactionCore(RoutingTransactionBuffer) ** ** {{wiki:​ProtectedMethod.gif|}} CommitTransactionCore(RoutingTransactionBuffer) **
  
-This method will commit the existing transaction to its underlying source of data.+  * //This method will commit the existing transaction to its underlying source of data.//
 == Remarks == == Remarks ==
-As this is the concrete version, the real work is done in the Core version of the method. It will commit the existing transaction to its underlying source of data. It will then pass back the results of the commit, including any error(s) received. Lastly, it will free up the internal memory cache of any RoutSegments added, updated or deleted. You will need to ensure that you have started a transaction by calling BeginTransaction.+  * //As this is the concrete version, the real work is done in the Core version of the method. It will commit the existing transaction to its underlying source of data. It will then pass back the results of the commit, including any error(s) received. Lastly, it will free up the internal memory cache of any RoutSegments added, updated or deleted. You will need to ensure that you have started a transaction by calling BeginTransaction.//
  
 == Return Value == == Return Value ==
Line 375: Line 378:
 ** {{wiki:​ProtectedMethod.gif|}} RollbackTransactionCore() ** ** {{wiki:​ProtectedMethod.gif|}} RollbackTransactionCore() **
  
-N/A+  * //N/A//
 == Remarks == == Remarks ==
-N/A+  * //For the most updated Info for this topic, please check it here:​http:​wiki.thinkgeo.com/​wiki/​ThinkGeo.MapSuite.Routing.RoutingSource#​RollbackTransactionCore.28.29/​/
  
 == Return Value == == Return Value ==
Line 387: Line 390:
 ** {{wiki:​ProtectedMethod.gif|}} Finalize() ** ** {{wiki:​ProtectedMethod.gif|}} Finalize() **
  
-N/A+  * //N/A//
 == Remarks == == Remarks ==
-N/A+  * //For the most updated Info for this topic, please check it here:​http:​wiki.thinkgeo.com/​wiki/​ThinkGeo.MapSuite.Routing.RoutingSource#​Finalize.28.29/​/
  
 == Return Value == == Return Value ==
Line 399: Line 402:
 ** {{wiki:​ProtectedMethod.gif|}} MemberwiseClone() ** ** {{wiki:​ProtectedMethod.gif|}} MemberwiseClone() **
  
-N/A+  * //N/A//
 == Remarks == == Remarks ==
-N/A+  * //For the most updated Info for this topic, please check it here:​http:​wiki.thinkgeo.com/​wiki/​ThinkGeo.MapSuite.Routing.RoutingSource#​MemberwiseClone.28.29/​/
  
 == Return Value == == Return Value ==
Line 445: Line 448:
 ==== Public Events ==== ==== Public Events ====
 ** {{wiki:​PublicEvent.gif|}} CommittingTransaction ** ** {{wiki:​PublicEvent.gif|}} CommittingTransaction **
-This event is raised after the CommitTransaction method is called, but before the CommitTransactionCore is called. ​ This allows you access to the TransactionBuffer before the transaction is committed. It also allows you to cancel the pending commit of the transaction.+This event is raised after the CommitTransaction method is called, but before the CommitTransactionCore is called. This allows you access to the TransactionBuffer before the transaction is committed. It also allows you to cancel the pending commit of the transaction.
 == Remarks == == Remarks ==
 This event is raised before the CommitTransactionCore is called and allows you access to the TransactionBuffer before the transaction is committed. It also allows you to cancel the pending transaction. The TransactionBuffer is the object that stores all of the pending transactions and is accessible through this event to allow you to either add, remove or modify transactions. In the event that you cancel the CommitTransaction method, the transaction remains intact and you will still be editing. This makes it a nice place to possibly check for connectivity before the TransactionCore code is run, which is where the records are actually committed. Calling the RollBackTransaction method is the only way to permanently cancel a pending transaction without committing it. This event is raised before the CommitTransactionCore is called and allows you access to the TransactionBuffer before the transaction is committed. It also allows you to cancel the pending transaction. The TransactionBuffer is the object that stores all of the pending transactions and is accessible through this event to allow you to either add, remove or modify transactions. In the event that you cancel the CommitTransaction method, the transaction remains intact and you will still be editing. This makes it a nice place to possibly check for connectivity before the TransactionCore code is run, which is where the records are actually committed. Calling the RollBackTransaction method is the only way to permanently cancel a pending transaction without committing it.
thinkgeo.mapsuite.routing.routingsource.1442545606.txt.gz · Last modified: 2015/09/18 03:06 by admin