public override DbGeometry GeometryFromProviderValue(object providerValue)
        {
            providerValue.CheckNull("providerValue");
            object normalizedProviderValue = NormalizeProviderValue(providerValue, this.SqlTypes.SqlGeometryType);

            return(this.SqlTypes.IsSqlGeometryNull(normalizedProviderValue) ? null : DbSpatialServices.CreateGeometry(this, normalizedProviderValue));
        }
Ejemplo n.º 2
0
 public override DbGeometry GeometryFromProviderValue(object providerValue)
 {
     return
         (providerValue == null || ((dynamic)providerValue).IsNull ?
          null :
          DbSpatialServices.CreateGeometry(this, providerValue));
 }
Ejemplo n.º 3
0
        public override DbGeometry GeometryFromText(string geometryText)
        {
            geometryText.CheckNull("geometryText");
            ReadOnlySpatialValues backingValue = new ReadOnlySpatialValues(DbGeometry.DefaultCoordinateSystemId, textValue: geometryText, binaryValue: null, gmlValue: null);

            return(DbSpatialServices.CreateGeometry(this, backingValue));
        }
Ejemplo n.º 4
0
        public override DbGeometry GeometryFromGml(string geometryMarkup, int spatialReferenceSystemId)
        {
            geometryMarkup.CheckNull("geometryMarkup");
            ReadOnlySpatialValues backingValue = new ReadOnlySpatialValues(spatialReferenceSystemId, textValue: null, binaryValue: null, gmlValue: geometryMarkup);

            return(DbSpatialServices.CreateGeometry(this, backingValue));
        }
Ejemplo n.º 5
0
        public override DbGeometry GeometryFromBinary(byte[] geometryBinary, int spatialReferenceSystemId)
        {
            geometryBinary.CheckNull("geometryBinary");
            ReadOnlySpatialValues backingValue = new ReadOnlySpatialValues(spatialReferenceSystemId, textValue: null, binaryValue: geometryBinary, gmlValue: null);

            return(DbSpatialServices.CreateGeometry(this, backingValue));
        }
Ejemplo n.º 6
0
 public override DbGeometry GeometryFromGml(
     string geometryMarkup,
     int spatialReferenceSystemId)
 {
     Check.NotNull <string>(geometryMarkup, nameof(geometryMarkup));
     return(DbSpatialServices.CreateGeometry((DbSpatialServices)this, (object)new DefaultSpatialServices.ReadOnlySpatialValues(spatialReferenceSystemId, (string)null, (byte[])null, geometryMarkup)));
 }
Ejemplo n.º 7
0
 public override DbGeometry GeometryFromBinary(
     byte[] geometryBinary,
     int spatialReferenceSystemId)
 {
     Check.NotNull <byte[]>(geometryBinary, nameof(geometryBinary));
     return(DbSpatialServices.CreateGeometry((DbSpatialServices)this, (object)new DefaultSpatialServices.ReadOnlySpatialValues(spatialReferenceSystemId, (string)null, geometryBinary, (string)null)));
 }
Ejemplo n.º 8
0
 public override DbGeometry GeometryFromText(string geometryText)
 {
     Check.NotNull <string>(geometryText, nameof(geometryText));
     return(DbSpatialServices.CreateGeometry((DbSpatialServices)this, (object)new DefaultSpatialServices.ReadOnlySpatialValues(DbGeometry.DefaultCoordinateSystemId, geometryText, (byte[])null, (string)null)));
 }
Ejemplo n.º 9
0
 public override DbGeometry GeometryFromProviderValue(object providerValue)
 {
     Check.NotNull <object>(providerValue, nameof(providerValue));
     return(DbSpatialServices.CreateGeometry((DbSpatialServices)this, (object)DefaultSpatialServices.CheckProviderValue(providerValue)));
 }