Class Vehicle
Represents a vehicle.
Inheritance
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public abstract class Vehicle
Constructors
Vehicle()
Creates a new vehicle.
Declaration
public Vehicle()
Properties
CustomDeserializer
Gets or sets a custom vehicle deserializer.
Declaration
public static Func<string, Stream, Vehicle> CustomDeserializer { get; set; }
Property Value
Func<System.String, Stream, Vehicle>
|
MetaWhiteList
Gets a whitelist of attributes to keep as meta-data.
Declaration
public virtual HashSet<string> MetaWhiteList { get; }
Property Value
HashSet<System.String>
|
Name
Gets the name of this vehicle.
Declaration
public abstract string Name { get; }
Property Value
System.String
|
Normalize
Gets the normalization flag.
Declaration
public virtual bool Normalize { get; }
Property Value
System.Boolean
|
Parameters
Gets parameters
Declaration
public virtual IReadonlyAttributeCollection Parameters { get; }
Property Value
IReadonlyAttributeCollection
|
ProfileWhiteList
Gets a whitelist of attributes to keep as part of the profile.
Declaration
public virtual HashSet<string> ProfileWhiteList { get; }
Property Value
HashSet<System.String>
|
VehicleTypes
Gets the vehicle types.
Declaration
public virtual string[] VehicleTypes { get; }
Property Value
System.String[]
|
Methods
AddToWhiteList(IAttributeCollection, Whitelist)
Adds a number of keys to the given whitelist when they are relevant for this vehicle.
Declaration
public virtual bool AddToWhiteList(IAttributeCollection attributes, Whitelist whitelist)
Parameters
IAttributeCollection
attributes
|
Whitelist
whitelist
|
Returns
System.Boolean
True if the edge with the given attributes is usefull for this vehicle. |
Deserialize(Stream)
Deserializes a vehicle from the given stream.
Declaration
public static Vehicle Deserialize(Stream stream)
Parameters
Stream
stream
|
Returns
Vehicle
|
DoSerialize(Stream)
Declaration
protected virtual long DoSerialize(Stream stream)
Parameters
Stream
stream
|
Returns
System.Int64
|
Equals(IAttributeCollection, IAttributeCollection)
Returns true if the two given edges are equals as far as this vehicle is concerned.
Declaration
public virtual bool Equals(IAttributeCollection attributes1, IAttributeCollection attributes2)
Parameters
IAttributeCollection
attributes1
|
IAttributeCollection
attributes2
|
Returns
System.Boolean
|
FactorAndSpeed(IAttributeCollection, Whitelist)
Calculates a factor and speed and adds a keys to the given whitelist that are relevant.
Declaration
public abstract FactorAndSpeed FactorAndSpeed(IAttributeCollection attributes, Whitelist whitelist)
Parameters
IAttributeCollection
attributes
|
Whitelist
whitelist
|
Returns
FactorAndSpeed
True if the edge with the given attributes is usefull for this vehicle. |
Fastest()
Gets the profile to calculate fastest routes.
Declaration
public virtual Profile Fastest()
Returns
Profile
|
Get(String)
Gets a registered vehicle.
Declaration
public static Vehicle Get(string name)
Parameters
System.String
name
|
Returns
Vehicle
|
GetProfiles()
Returns the profiles for this vehicle.
Declaration
public IEnumerable<Profile> GetProfiles()
Returns
IEnumerable<Profile>
|
GetRegistered()
Gets all registered vehicles.
Declaration
public static IEnumerable<Vehicle> GetRegistered()
Returns
IEnumerable<Vehicle>
|
Profile(String)
Returns the profile with the given name.
Declaration
public Profile Profile(string name)
Parameters
System.String
name
|
Returns
Profile
|
Register()
Registers this vehicle.
Declaration
public virtual void Register()
Register(Profile)
Register(Vehicle)
Registers a vehicle.
Declaration
public static void Register(Vehicle vehicle)
Parameters
Vehicle
vehicle
|
Serialize(Stream)
Serializes this vehicle.
Declaration
public long Serialize(Stream stream)
Parameters
Stream
stream
|
Returns
System.Int64
|
Shortest()
Gets the profile to calculate shortest routes.
Declaration
public virtual Profile Shortest()
Returns
Profile
|
ToString()
Gets a description of this vehicle.
Declaration
public override string ToString()
Returns
System.String
|
Overrides
TryGet(String, out Vehicle)
Tries to get a registred vehicle.
Declaration
public static bool TryGet(string name, out Vehicle value)
Parameters
System.String
name
|
Vehicle
value
|
Returns
System.Boolean
|