Table of Contents

ThinkGeo.MapSuite.Routing.RoutingSource

Note: The page was created before Map Suite 10. Map Suite 10.0 organized many classes into new namespaces and assemblies as well as had a few minor breaks in compatibility. The majority of previously built code should work without modification assuming the new namespaces are added. For guidance on upgrading your existing code, please check out MapSuite 10 Upgrade Guide.

This class is the base class for all types of RoutingSource.

Inheritance Hierarchy

Members Summary

Public Constructors

Protected Constructors

RoutingSource()

Remarks
Parameters

Public Methods

GetRouteSegmentCount()

Remarks
Return Value
Parameters

Open()

Remarks
Return Value
Parameters

Close()

Remarks
Return Value
Parameters

GetRouteSegmentByFeatureId(String)

Remarks
Return Value
Parameters

GetRouteSegmentsNearestTo(BaseShape,FeatureSource,GeographyUnit,Int32)

Remarks
Return Value
Parameters

BeginTransaction()

Remarks
Return Value
Parameters

CommitTransaction()

Remarks
Return Value
Parameters

RollbackTransaction()

Remarks
Return Value
Parameters

AddRouteSegment(RouteSegment)

Remarks
Return Value
Parameters

UpdateRouteSegment(RouteSegment)

Remarks
Return Value
Parameters

DeleteRouteSegment(String)

Remarks
Return Value
Parameters

ToString()

Remarks
Return Value
Parameters

Equals(Object)

Remarks
Return Value
Parameters

GetHashCode()

Remarks
Return Value
Parameters

GetType()

Remarks
Return Value
Parameters

Protected Methods

OnCommittingTransaction(RoutingCommittingTransactionEventArgs)

Remarks
Return Value
Parameters

OnCommittedTransaction(RoutingCommittedTransactionEventArgs)

Remarks
Return Value
Parameters

GetRouteSegmentCountCore()

Remarks
Return Value
Parameters

OpenCore()

Remarks
Return Value
Parameters

CloseCore()

Remarks
Return Value
Parameters

GetRouteSegmentByFeatureIdCore(String)

Remarks
Return Value
Parameters

GetRouteSegmentsNearestToCore(BaseShape,FeatureSource,GeographyUnit,Int32)

Remarks
Return Value
Parameters

BeginTransactionCore()

Remarks
Return Value
Parameters

CommitTransactionCore(RoutingTransactionBuffer)

Remarks
Return Value
Parameters

RollbackTransactionCore()

Remarks
Return Value
Parameters

Finalize()

Remarks
Return Value
Parameters

MemberwiseClone()

Remarks
Return Value
Parameters

Public Properties

IsOpen

This property returns true if the RoutingSource is open and false if it is not.

Remarks

Various methods on the RoutingSource require that it be in an open state. If one of those methods is called when the state is not open, then the method will throw an exception. To enter the open state, you must call the RoutingSource's Open method.

Return Value

IsInTransaction

This property returns true if the RoutingSource is in a transaction and false if it is not.

Remarks

To enter a transaction, you must first call the BeginTransaction method of the RoutingSource. It is possible that some RoutingSource are read-only and do not allow edits. To end a transaction, you must either call CommitTransaction or RollbackTransaction.

Return Value

IsEditable

This property returns whether the RoutingSource allows edits or is read-only.

Remarks

This property is useful to check if a specific RoutingSource accepts editing. If you call BeginTransaction and this property is false, then an exception will be raised. For developers who are creating or extending a RoutingSource, it is expected that you override this virtual method if the new RoutingSource you are creating allows edits.

Return Value

Protected Properties

kRQ=

N/A

Remarks

N/A

Return Value

Public Events

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.

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.

Event Arguments:RoutingCommittingTransactionEventArgs

CommittedTransaction This event is raised after the CommitTransaction and the CommitTransactionCore are called and allows you access to the TransactionBuffer and the TransactionResults object before CommitTransaction method is returned.

Remarks

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 analyse the results of the transaction and do any cleanup code necessary. In the event some of the records did not commit, you can handle those 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.

Event Arguments:RoutingCommittedTransactionEventArgs