Classe SqlGeographyBuilder

Constructs instances of SqlGeography objects by using IGeographySink interface.

Hiérarchie d'héritage

System.Object
  Microsoft.SqlServer.Types.SqlGeographyBuilder

Espace de noms :  Microsoft.SqlServer.Types
Assembly :  Microsoft.SqlServer.Types (en Microsoft.SqlServer.Types.dll)

Syntaxe

'Déclaration
<CLSCompliantAttribute(True)> _
Public Class SqlGeographyBuilder _
    Implements IGeographySink110, IGeographySink
'Utilisation
Dim instance As SqlGeographyBuilder
[CLSCompliantAttribute(true)]
public class SqlGeographyBuilder : IGeographySink110, 
    IGeographySink
[CLSCompliantAttribute(true)]
public ref class SqlGeographyBuilder : IGeographySink110, 
    IGeographySink
[<CLSCompliantAttribute(true)>]
type SqlGeographyBuilder =  
    class 
        interface IGeographySink110 
        interface IGeographySink 
    end
public class SqlGeographyBuilder implements IGeographySink110, IGeographySink

Le type SqlGeographyBuilder expose les membres suivants.

Constructeurs

  Nom Description
Méthode publique SqlGeographyBuilder Constructs a SqlGeographyBuilder object.

Haut de la page

Propriétés

  Nom Description
Propriété publique ConstructedGeography Retrieves the constructed spatial geography object.

Haut de la page

Méthodes

  Nom Description
Méthode publique AddCircularArc(Double, Double, Double, Double) Adds a circular arc to the path.
Méthode publique AddCircularArc(Double, Double, Nullable<Double>, Nullable<Double>, Double, Double, Nullable<Double>, Nullable<Double>) Adds a circular arc to the path.
Méthode publique AddLine(Double, Double) Constructs additional points in a geography type figure.
Méthode publique AddLine(Double, Double, Nullable<Double>, Nullable<Double>) Constructs additional points in a geography type figure.
Méthode publique BeginFigure(Double, Double) Starts the call sequence for a geography figure.
Méthode publique BeginFigure(Double, Double, Nullable<Double>, Nullable<Double>) Starts the call sequence for a geography figure.
Méthode publique BeginGeography Initializes a call sequence for a geography type.
Méthode publique EndFigure Finishes a call sequence for a geography figure.
Méthode publique EndGeography Finishes a call sequence for a geography type.
Méthode publique Equals (hérité de Object.)
Méthode protégée Finalize (hérité de Object.)
Méthode publique GetHashCode (hérité de Object.)
Méthode publique GetType (hérité de Object.)
Méthode protégée MemberwiseClone (hérité de Object.)
Méthode publique SetSrid Sets the Spatial Reference Identifier (SRID) for a geography type call sequence.
Méthode publique ToString (hérité de Object.)

Haut de la page

Notes

Throws FormatException for an invalid call sequence or when a call sequence is incomplete when ConstructedGeography() is invoked.

Exemples

The following example constructs a SqlGeometry object from a MultiLineString.

SqlGeographyBuilder b = new SqlGeographyBuilder();

b.SetSrid(4326);

b.BeginGeography(OpenGisGeographyType.MultiLineString);

b.BeginGeography(OpenGisGeographyType.LineString);

b.BeginFigure(-122.358, 47.653);

b.AddLine(-122.348, 47.649);

b.EndFigure();

b.EndGeography();

b.BeginGeography(OpenGisGeographyType.LineString);

b.BeginFigure(-118.481, 48.328);

b.AddLine(-119.002, 47.324);

b.EndFigure();

b.EndGeography();

b.EndGeography();

SqlGeography g = b.ConstructedGeography();

Sécurité des threads

Tous les membres publics static (Shared dans Visual Basic) de ce type sont thread-safe. Tous les membres de l'instance ne sont pas garantis comme étant thread-safe.

Voir aussi

Référence

Espace de noms Microsoft.SqlServer.Types