Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
197 lines (173 sloc) 13.6 KB
<Type Name="CivicAddressResolver" FullName="System.Device.Location.CivicAddressResolver">
<TypeSignature Language="C#" Value="public sealed class CivicAddressResolver : System.Device.Location.ICivicAddressResolver" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit CivicAddressResolver extends System.Object implements class System.Device.Location.ICivicAddressResolver" />
<TypeSignature Language="DocId" Value="T:System.Device.Location.CivicAddressResolver" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class CivicAddressResolver&#xA;Implements ICivicAddressResolver" />
<TypeSignature Language="C++ CLI" Value="public ref class CivicAddressResolver sealed : System::Device::Location::ICivicAddressResolver" />
<TypeSignature Language="F#" Value="type CivicAddressResolver = class&#xA; interface ICivicAddressResolver" />
<AssemblyInfo>
<AssemblyName>System.Device</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Device.Location.ICivicAddressResolver</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>Provides functionality for resolving a coordinate-based location to a civic address.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Device.Location.CivicAddressResolver> class provides an implementation of <xref:System.Device.Location.ICivicAddressResolver> that resolves a coordinate-based location to a civic address if the location provider provides both coordinates and civic address data.
## Examples
The following program shows how to call <xref:System.Device.Location.CivicAddressResolver.ResolveAddress%2A> to resolve a civic address synchronously.
[!code-csharp[System.Device.Location.ResolveCivicAddressSync#1](~/samples/snippets/csharp/VS_Snippets_Misc/system.device.location.resolvecivicaddresssync/cs/resolvecivicaddresssync.cs#1)]
[!code-vb[System.Device.Location.ResolveCivicAddressSync#1](~/samples/snippets/visualbasic/VS_Snippets_Misc/system.device.location.resolvecivicaddresssync/vb/resolvecivicaddresssync.vb#1)]
The following program shows how to call <xref:System.Device.Location.CivicAddressResolver.ResolveAddressAsync%2A> to resolve a civic address asynchronously.
[!code-csharp[System.Device.Location.ResolveCivicAddressSync#1](~/samples/snippets/csharp/VS_Snippets_Misc/system.device.location.resolvecivicaddresssync/cs/resolvecivicaddresssync.cs#1)]
[!code-vb[System.Device.Location.ResolveCivicAddressSync#1](~/samples/snippets/visualbasic/VS_Snippets_Misc/system.device.location.resolvecivicaddresssync/vb/resolvecivicaddresssync.vb#1)]
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public CivicAddressResolver ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Device.Location.CivicAddressResolver.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; CivicAddressResolver();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Device</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Device.Location.CivicAddressResolver" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example shows how to initialize a new instance of the <xref:System.Device.Location.CivicAddressResolver> class.
```csharp
CivicAddressResolver resolver = new CivicAddressResolver();
```
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ResolveAddress">
<MemberSignature Language="C#" Value="public System.Device.Location.CivicAddress ResolveAddress (System.Device.Location.GeoCoordinate coordinate);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Device.Location.CivicAddress ResolveAddress(class System.Device.Location.GeoCoordinate coordinate) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Device.Location.CivicAddressResolver.ResolveAddress(System.Device.Location.GeoCoordinate)" />
<MemberSignature Language="VB.NET" Value="Public Function ResolveAddress (coordinate As GeoCoordinate) As CivicAddress" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::Device::Location::CivicAddress ^ ResolveAddress(System::Device::Location::GeoCoordinate ^ coordinate);" />
<MemberSignature Language="F#" Value="abstract member ResolveAddress : System.Device.Location.GeoCoordinate -&gt; System.Device.Location.CivicAddress&#xA;override this.ResolveAddress : System.Device.Location.GeoCoordinate -&gt; System.Device.Location.CivicAddress" Usage="civicAddressResolver.ResolveAddress coordinate" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Device.Location.ICivicAddressResolver.ResolveAddress(System.Device.Location.GeoCoordinate)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Device</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Device.Location.CivicAddress</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="coordinate" Type="System.Device.Location.GeoCoordinate" />
</Parameters>
<Docs>
<param name="coordinate">The <see cref="T:System.Device.Location.GeoCoordinate" /> containing the location to resolve to a civic address.</param>
<summary>Synchronously resolves a civic address from a location based on latitude and longitude. This call will block execution of the calling thread while the address is being resolved.</summary>
<returns>The civic address that is resolved from the <paramref name="coordinate" /> parameter. <see cref="F:System.Device.Location.CivicAddress.Unknown" /> is returned if the address cannot be resolved.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Device.Location.ICivicAddressResolver.ResolveAddressCompleted> event is raised when the address resolve operation completes. The civic address that is resolved from the `coordinate` parameter is returned by the <xref:System.Device.Location.ResolveAddressCompletedEventArgs.Address%2A> member of the <xref:System.Device.Location.ResolveAddressCompletedEventArgs> object that is passed to the event handler.
## Examples
The following program demonstrates how to call <xref:System.Device.Location.CivicAddressResolver.ResolveAddress%2A> to resolve a civic address synchronously.
[!code-csharp[System.Device.Location.ResolveCivicAddressSync#1](~/samples/snippets/csharp/VS_Snippets_Misc/system.device.location.resolvecivicaddresssync/cs/resolvecivicaddresssync.cs#1)]
[!code-vb[System.Device.Location.ResolveCivicAddressSync#1](~/samples/snippets/visualbasic/VS_Snippets_Misc/system.device.location.resolvecivicaddresssync/vb/resolvecivicaddresssync.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="coordinate" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="coordinate" /> does not contain a valid latitude and longitude.</exception>
</Docs>
</Member>
<Member MemberName="ResolveAddressAsync">
<MemberSignature Language="C#" Value="public void ResolveAddressAsync (System.Device.Location.GeoCoordinate coordinate);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ResolveAddressAsync(class System.Device.Location.GeoCoordinate coordinate) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Device.Location.CivicAddressResolver.ResolveAddressAsync(System.Device.Location.GeoCoordinate)" />
<MemberSignature Language="VB.NET" Value="Public Sub ResolveAddressAsync (coordinate As GeoCoordinate)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void ResolveAddressAsync(System::Device::Location::GeoCoordinate ^ coordinate);" />
<MemberSignature Language="F#" Value="abstract member ResolveAddressAsync : System.Device.Location.GeoCoordinate -&gt; unit&#xA;override this.ResolveAddressAsync : System.Device.Location.GeoCoordinate -&gt; unit" Usage="civicAddressResolver.ResolveAddressAsync coordinate" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Device.Location.ICivicAddressResolver.ResolveAddressAsync(System.Device.Location.GeoCoordinate)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Device</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="coordinate" Type="System.Device.Location.GeoCoordinate" />
</Parameters>
<Docs>
<param name="coordinate">The <see cref="T:System.Device.Location.GeoCoordinate" /> containing the location to resolve to a civic address.</param>
<summary>Resolves an address asynchronously from a location that is based on latitude and longitude. The call does not block execution of the calling thread while the address is being resolved.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following program shows how to call <xref:System.Device.Location.CivicAddressResolver.ResolveAddressAsync%2A> to resolve a civic address asynchronously.
[!code-csharp[System.Device.Location.ResolveCivicAddressAsync#1](~/samples/snippets/csharp/VS_Snippets_Misc/system.device.location.resolvecivicaddressasync/cs/resolvecivicaddressasync.cs#1)]
[!code-vb[System.Device.Location.ResolveCivicAddressAsync#1](~/samples/snippets/visualbasic/VS_Snippets_Misc/system.device.location.resolvecivicaddressasync/vb/resolvecivicaddressasync.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="coordinate" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="coordinate" /> does not contain a valid latitude and longitude.</exception>
</Docs>
</Member>
<Member MemberName="ResolveAddressCompleted">
<MemberSignature Language="C#" Value="public event EventHandler&lt;System.Device.Location.ResolveAddressCompletedEventArgs&gt; ResolveAddressCompleted;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler`1&lt;class System.Device.Location.ResolveAddressCompletedEventArgs&gt; ResolveAddressCompleted" />
<MemberSignature Language="DocId" Value="E:System.Device.Location.CivicAddressResolver.ResolveAddressCompleted" />
<MemberSignature Language="VB.NET" Value="Public Custom Event ResolveAddressCompleted As EventHandler(Of ResolveAddressCompletedEventArgs) " FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual event EventHandler&lt;System::Device::Location::ResolveAddressCompletedEventArgs ^&gt; ^ ResolveAddressCompleted;" />
<MemberSignature Language="F#" Value="member this.ResolveAddressCompleted : EventHandler&lt;System.Device.Location.ResolveAddressCompletedEventArgs&gt; " Usage="member this.ResolveAddressCompleted : System.EventHandler&lt;System.Device.Location.ResolveAddressCompletedEventArgs&gt; " />
<MemberSignature Language="VB.NET" Value="Public Event ResolveAddressCompleted As EventHandler(Of ResolveAddressCompletedEventArgs) " FrameworkAlternate="netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<MemberType>Event</MemberType>
<Implements>
<InterfaceMember>E:System.Device.Location.ICivicAddressResolver.ResolveAddressCompleted</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Device</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler&lt;System.Device.Location.ResolveAddressCompletedEventArgs&gt;</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the address resolution that was initiated by a call to <see cref="M:System.Device.Location.CivicAddressResolver.ResolveAddressAsync(System.Device.Location.GeoCoordinate)" /> completes.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following program shows how to call <xref:System.Device.Location.CivicAddressResolver.ResolveAddressAsync%2A> to resolve a civic address asynchronously.
[!code-csharp[System.Device.Location.ResolveCivicAddressAsync#1](~/samples/snippets/csharp/VS_Snippets_Misc/system.device.location.resolvecivicaddressasync/cs/resolvecivicaddressasync.cs#1)]
[!code-vb[System.Device.Location.ResolveCivicAddressAsync#1](~/samples/snippets/visualbasic/VS_Snippets_Misc/system.device.location.resolvecivicaddressasync/vb/resolvecivicaddressasync.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.