• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Locator类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Locator的典型用法代码示例。如果您正苦于以下问题:C# Locator类的具体用法?C# Locator怎么用?C# Locator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Locator类属于命名空间,在下文中一共展示了Locator类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: BatchGeocoding

        public BatchGeocoding()
        {
            InitializeComponent();

            ESRI.ArcGIS.Client.Geometry.Envelope initialExtent =
                        new ESRI.ArcGIS.Client.Geometry.Envelope(
                    _mercator.FromGeographic(
                        new ESRI.ArcGIS.Client.Geometry.MapPoint(-117.387, 33.97)) as MapPoint,
                    _mercator.FromGeographic(
                        new ESRI.ArcGIS.Client.Geometry.MapPoint(-117.355, 33.988)) as MapPoint);

            initialExtent.SpatialReference = new SpatialReference(102100);

            MyMap.Extent = initialExtent;

            _locatorTask = new Locator("http://serverapps101.esri.com/arcgis/rest/services/USA_Geocode/GeocodeServer");
            _locatorTask.AddressesToLocationsCompleted += _locatorTask_AddressesToLocationsCompleted;
            _locatorTask.Failed += LocatorTask_Failed;

            geocodedResults = MyMap.Layers["LocationGraphicsLayer"] as GraphicsLayer;

            //List of addresses to geocode
            batchaddresses.Add(new Dictionary<string, string> { { "Street", "4409 Redwood Dr" }, { "Zip", "92501" } });
            batchaddresses.Add(new Dictionary<string, string> { { "Street", "3758 Cedar St" }, { "Zip", "92501" } });
            batchaddresses.Add(new Dictionary<string, string> { { "Street", "3486 Orange St" }, { "Zip", "92501" } });
            batchaddresses.Add(new Dictionary<string, string> { { "Street", "2999 4th St" }, { "Zip", "92507" } });
            batchaddresses.Add(new Dictionary<string, string> { { "Street", "3685 10th St" }, { "Zip", "92501" } });

            AddressListbox.ItemsSource = batchaddresses;
        }
开发者ID:konglingjie,项目名称:arcgis-samples-silverlight,代码行数:30,代码来源:BatchGeocoding.xaml.cs


示例2: FindAddressButton_Click

        private void FindAddressButton_Click(object sender, RoutedEventArgs e)
        {
            graphicsLayer.ClearGraphics();
            AddressBorder.Visibility = Visibility.Collapsed;
            ResultsTextBlock.Visibility = Visibility.Collapsed;

            Locator locatorTask = new Locator("http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer");
            locatorTask.AddressToLocationsCompleted += LocatorTask_AddressToLocationsCompleted;
            locatorTask.Failed += LocatorTask_Failed;

            AddressToLocationsParameters addressParams = new AddressToLocationsParameters()
            {
                OutSpatialReference = MyMap.SpatialReference
            };

            Dictionary<string, string> address = addressParams.Address;

            if (!string.IsNullOrEmpty(Address.Text))
                address.Add("Address", Address.Text);
            if (!string.IsNullOrEmpty(City.Text))
                address.Add("City", City.Text);
            if (!string.IsNullOrEmpty(StateAbbrev.Text))
                address.Add("Region", StateAbbrev.Text);
            if (!string.IsNullOrEmpty(Zip.Text))
                address.Add("Postal", Zip.Text);

            locatorTask.AddressToLocationsAsync(addressParams);
        }
开发者ID:Esri,项目名称:arcgis-samples-winphone,代码行数:28,代码来源:AddressToLocation.xaml.cs


示例3: FindAddressButton_Click

        private void FindAddressButton_Click(object sender, RoutedEventArgs e)

        {
   

            Locator locatorTask = new Locator("http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer");

            locatorTask.AddressToLocationsCompleted += LocatorTask_AddressToLocationsCompleted;
            locatorTask.Failed += LocatorTask_Failed;
            AddressToLocationsParameters addressParams = new AddressToLocationsParameters();
            
            Dictionary<string, string> address = addressParams.Address;

            if (!string.IsNullOrEmpty(Address.Text))
                address.Add("Address", Address.Text);
            if (!string.IsNullOrEmpty(City.Text))
                address.Add("City", City.Text);
            if (!string.IsNullOrEmpty(State.Text))
                address.Add("Region", State.Text);
            if (!string.IsNullOrEmpty(Zip.Text))
                address.Add("Postal", Zip.Text);
            address.Add("forStorage", "true");
            address.Add("token","pgPwo32cfo-kLf0ABYjV9RZjxGNfFB4--xSkGLOY4bUx0UhmFMc0-06KJCPtx4uRsIGuO_9xn_cxI2G2w9IoD3hX7Q-LGulIg2VhKUcvklXu7CblMg1--yg5kznhXjSF");
            locatorTask.AddressToLocationsAsync(addressParams);
        }
开发者ID:ApexGIS,项目名称:developer-support,代码行数:25,代码来源:MainWindow.xaml.cs


示例4: UDPTransmitter

 public UDPTransmitter(Uri uri, int bufferSize)
 {
     var addresses = System.Net.Dns.GetHostAddresses(uri.Host);
     int port = (uri.Port < 0 ? 0 : uri.Port);
     if (addresses != null && addresses.Length >= 1)
         this.locator = new Locator(addresses[0], port);
  }
开发者ID:Egipto87,项目名称:DOOP.ec,代码行数:7,代码来源:UDPTransmitter.cs


示例5: AddingToSameKeyTwiceThrows

        public void AddingToSameKeyTwiceThrows()
        {
            object o = new object();
            IReadWriteLocator locator = new Locator();

            locator.Add("foo1", o);
            locator.Add("foo1", o);
        }
开发者ID:bnantz,项目名称:NCS-V2-0,代码行数:8,代码来源:LocatorFixture.cs


示例6: CannotCastAReadOnlyLocatorToAReadWriteLocator

		public void CannotCastAReadOnlyLocatorToAReadWriteLocator()
		{
			Locator innerLocator = new Locator();
			ReadOnlyLocator locator = new ReadOnlyLocator(innerLocator);

			Assert.IsTrue(locator.ReadOnly);
			Assert.IsNull(locator as IReadWriteLocator);
		}
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:8,代码来源:ReadOnlyLocatorFixture.cs


示例7: ResolveByType_WithRegisterdObject_ShouldBeAssignableToIDoSomething

        public void ResolveByType_WithRegisterdObject_ShouldBeAssignableToIDoSomething(Locator.Interface.IServiceLocator sut)
        {
            var instance = sut.Resolve(typeof(IDoSomething));

            instance.ShouldNotBeNull();

            instance.ShouldBeAssignableTo(typeof(IDoSomething));
        }
开发者ID:raulnq,项目名称:Jal.Locator,代码行数:8,代码来源:ServiceLocatorTest.cs


示例8: UDPReceiver

 public UDPReceiver(Uri uri, int bufferSize)
 {
     this.uri = uri;
     this.bufferSize = bufferSize;
     var addresses = System.Net.Dns.GetHostAddresses(uri.Host);
     int port = (uri.Port < 0 ? 0 : uri.Port);
     if (addresses != null && addresses.Length >= 1)
         this.locator = new Locator(addresses[0], port);
 }
开发者ID:Egipto87,项目名称:DOOP.ec,代码行数:9,代码来源:UDPReceiver.cs


示例9: GenericGetWithSearchModeEnforcesDataType

        public void GenericGetWithSearchModeEnforcesDataType()
        {
            Locator innerLocator = new Locator();
            ReadOnlyLocator locator = new ReadOnlyLocator(innerLocator);

            innerLocator.Add(1, 2);

            locator.Get<string>(1, SearchMode.Local);
        }
开发者ID:bnantz,项目名称:NCS-V2-0,代码行数:9,代码来源:ReadOnlyLocatorFixture.cs


示例10: GenericGetEnforcesDataType

        public void GenericGetEnforcesDataType()
        {
            Locator innerLocator = new Locator();
            ReadOnlyLocator locator = new ReadOnlyLocator(innerLocator);

            innerLocator.Add(1, 2);

            locator.Get<string>(1);
        }
开发者ID:bnantz,项目名称:NCS-V2-0,代码行数:9,代码来源:ReadOnlyLocatorFixture.cs


示例11: GetLocator

        public static void GetLocator(this IoBuffer buffer, ref Locator obj)
        {
            obj.Kind = (LocatorKind)buffer.GetInt32();
            obj.Port = (int)buffer.GetInt32(); ;
            byte[] tmp = new byte[16];

            buffer.Get(tmp, 0, 16);
            obj.SocketAddressBytes = tmp;
        }
开发者ID:Egipto87,项目名称:DOOP.ec,代码行数:9,代码来源:LocatorEncoder.cs


示例12: ReadOnlyLocatorCountReflectsInnerLocatorCount

		public void ReadOnlyLocatorCountReflectsInnerLocatorCount()
		{
			Locator innerLocator = new Locator();
			ReadOnlyLocator locator = new ReadOnlyLocator(innerLocator);

			innerLocator.Add(1, 1);
			innerLocator.Add(2, 2);

			Assert.AreEqual(innerLocator.Count, locator.Count);
		}
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:10,代码来源:ReadOnlyLocatorFixture.cs


示例13: MyMap_MouseClick

        private void MyMap_MouseClick(object sender, ESRI.ArcGIS.Client.Map.MouseEventArgs e)
        {
            Locator locatorTask = new Locator("http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer");
            locatorTask.LocationToAddressCompleted += LocatorTask_LocationToAddressCompleted;
            locatorTask.Failed += LocatorTask_Failed;

            // Tolerance (distance) specified in meters
            double tolerance = 30;
            locatorTask.LocationToAddressAsync(e.MapPoint, tolerance, e.MapPoint);
        }
开发者ID:konglingjie,项目名称:arcgis-samples-silverlight,代码行数:10,代码来源:LocationToAddress.xaml.cs


示例14: WebControl

 public WebControl(Browser aBrowser, Locator aLocator)
 {
     myControlAccess = new ControlAccess();
     myControlAccess.Browser = aBrowser;
     myControlAccess.LocatorType = aLocator.LocatorType;
     myControlAccess.Locator = aLocator.ControlLocator;
     myControlAccess.ControlType = ControlType.Custom;
     myControlAccess.IntializeControlAccess();
     //Control = myControlAccess.GetControl();
 }
开发者ID:geeksree,项目名称:cSharpGeeks,代码行数:10,代码来源:WebControl.cs


示例15: Locator2Impl

        /**
         * Copy an existing Locator or Locator2 object.
         * If the object implements Locator2, values of the
         * <em>encoding</em> and <em>version</em>strings are copied,
         * otherwise they set to <em>null</em>.
         *
         * @param locator The existing Locator object.
         */
        public Locator2Impl(Locator locator)
            : base(locator)
        {
            if (locator is Locator2)
            {
                Locator2 l2 = (Locator2)locator;

                version = l2.getXMLVersion();
                encoding = l2.getEncoding();
            }
        }
开发者ID:sailesh341,项目名称:JavApi,代码行数:19,代码来源:org.xml.sax.ext.Locator2Impl.cs


示例16: ParentLocatorOfReadOnlyLocatorIsAlsoReadOnly

		public void ParentLocatorOfReadOnlyLocatorIsAlsoReadOnly()
		{
			Locator parentInnerLocator = new Locator();
			Locator childInnerLocator = new Locator(parentInnerLocator);
			ReadOnlyLocator childLocator = new ReadOnlyLocator(childInnerLocator);

			IReadableLocator parentLocator = childLocator.ParentLocator;

			Assert.IsTrue(parentLocator.ReadOnly);
			Assert.IsNull(parentLocator as IReadWriteLocator);
		}
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:11,代码来源:ReadOnlyLocatorFixture.cs


示例17: ItemsContainedInLocatorContainedInReadOnlyLocator

		public void ItemsContainedInLocatorContainedInReadOnlyLocator()
		{
			Locator innerLocator = new Locator();
			ReadOnlyLocator locator = new ReadOnlyLocator(innerLocator);

			innerLocator.Add(1, 1);
			innerLocator.Add(2, 2);

			Assert.IsTrue(locator.Contains(1));
			Assert.IsTrue(locator.Contains(2));
			Assert.IsFalse(locator.Contains(3));
		}
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:12,代码来源:ReadOnlyLocatorFixture.cs


示例18: AddBuildTags

        public static void AddBuildTags(TCConnection connection, string locatorBuildValue, Locator locator, params string[] tags)
        {
            var url = connection.UrlResolver.ResolveURL<BuildTagCollectionInfo>(locatorBuildValue, locator);
            RestRequest request = new RestRequest(url, Method.POST);

            BuildTagsInfo tagsInfo = new BuildTagsInfo()
            {
                Tags = tags
            };

            connection.CallPostRequest<BuildTagsInfo>(request, tagsInfo);
        }
开发者ID:tomdef,项目名称:nTeamCity,代码行数:12,代码来源:PostActionsHelper.cs


示例19: ARPLocation

 ARPLocation(Locator locator)
 {
     if (locator==null){
       inputName = "unknown-source";
       publicId = "unknown-source";
       endLine = -1;
       endColumn = -1;
     }else {
     inputName = locator.getSystemId();
     endLine = locator.getLineNumber();
     endColumn = locator.getColumnNumber();
     publicId = locator.getPublicId();
     }
 }
开发者ID:pedroneto,项目名称:Monografia,代码行数:14,代码来源:ARPLocation.cs


示例20: AskingParentStopsAsSoonAsWeFindAMatch

        public void AskingParentStopsAsSoonAsWeFindAMatch()
        {
            object o1 = new object();
            object o2 = new object();
            IReadWriteLocator rootLocator = new Locator();
            IReadWriteLocator childLocator = new Locator(rootLocator);
            IReadWriteLocator grandchildLocator = new Locator(childLocator);

            rootLocator.Add("foo", o1);
            childLocator.Add("foo", o2);

            object result = grandchildLocator.Get("foo", SearchMode.Up);

            Assert.IsNotNull(result);
            Assert.AreSame(o2, result);
        }
开发者ID:bnantz,项目名称:NCS-V2-0,代码行数:16,代码来源:LocatorFixture.cs



注:本文中的Locator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Lock类代码示例发布时间:2022-05-24
下一篇:
C# Locations类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap