internal DbGeometry(DbSpatialServices spatialServices, object spatialProviderValue) { Debug.Assert(spatialServices != null, "Spatial services are required"); Debug.Assert(spatialProviderValue != null, "Provider value is required"); this.spatialSvcs = spatialServices; this.providerValue = spatialProviderValue; }
/// <summary> /// This method is intended for use by derived implementations of <see cref="GeometryFromProviderValue"/> after suitable validation of the specified provider value to ensure it is suitable for use with the derived implementation. /// </summary> /// <param name="spatialServices">The spatial services instance that the returned <see cref="DbGeometry"/> value will depend on for its implementation of spatial functionality.</param> /// <param name="providerValue"></param> /// <returns>A new <see cref="DbGeometry"/> instance that contains the specified <paramref name="providerValue"/> and uses the specified <paramref name="spatialServices"/> as its spatial implementation</returns> /// <exception cref="ArgumentNullException"><paramref name="spatialServices"/> or <paramref name="providerValue"/> is null.</exception> protected static DbGeometry CreateGeometry(DbSpatialServices spatialServices, object providerValue) { spatialServices.CheckNull("spatialServices"); providerValue.CheckNull("providerValue"); return new DbGeometry(spatialServices, providerValue); }