当前位置: 首页>>代码示例>>C#>>正文


C# Query类代码示例

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


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

示例1: FetchAll

 public ErrorLogCollection FetchAll()
 {
     ErrorLogCollection coll = new ErrorLogCollection();
     Query qry = new Query(ErrorLog.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:khaha2210,项目名称:radio,代码行数:7,代码来源:ErrorLogController.cs

示例2: FetchAll

 public StudyHistoryCollection FetchAll()
 {
     var coll = new StudyHistoryCollection();
     var qry = new Query(StudyHistory.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:khaha2210,项目名称:radio,代码行数:7,代码来源:StudyHistoryController.cs

示例3: FetchAll

 public DisposeTableCollection FetchAll()
 {
     DisposeTableCollection coll = new DisposeTableCollection();
     Query qry = new Query(DisposeTable.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:howgoo,项目名称:SubSonic-2.0,代码行数:7,代码来源:DisposeTableController.cs

示例4: FetchAll

 public QheDoituongThuocCollection FetchAll()
 {
     QheDoituongThuocCollection coll = new QheDoituongThuocCollection();
     Query qry = new Query(QheDoituongThuoc.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:khaha2210,项目名称:VXIS,代码行数:7,代码来源:QheDoituongThuocController.cs

示例5: FetchAll

 public B3LookupContactIDCollection FetchAll()
 {
     B3LookupContactIDCollection coll = new B3LookupContactIDCollection();
     Query qry = new Query(B3LookupContactID.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:Publiship,项目名称:WWI_CRM_folders,代码行数:7,代码来源:B3LookupContactIDController.cs

示例6: FetchAll

 public TDutruThuocCollection FetchAll()
 {
     TDutruThuocCollection coll = new TDutruThuocCollection();
     Query qry = new Query(TDutruThuoc.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:khaha2210,项目名称:VXIS,代码行数:7,代码来源:TDutruThuocController.cs

示例7: FetchAll

 public AspnetPersonalizationAllUserCollection FetchAll()
 {
     AspnetPersonalizationAllUserCollection coll = new AspnetPersonalizationAllUserCollection();
     Query qry = new Query(AspnetPersonalizationAllUser.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:unepwcmc,项目名称:sigtrade,代码行数:7,代码来源:AspnetPersonalizationAllUserController.cs

示例8: GetIdfWeightedTerms

 /// <summary> Extracts all terms texts of a given Query into an array of WeightedTerms
 /// 
 /// </summary>
 /// <param name="query">Query to extract term texts from</param>
 /// <param name="reader">used to compute IDF which can be used to a) score selected fragments better 
 /// b) use graded highlights eg chaning intensity of font color</param>
 /// <param name="fieldName">the field on which Inverse Document Frequency (IDF) calculations are based</param>
 /// <returns> an array of the terms used in a query, plus their weights.</returns>
 public static WeightedTerm[] GetIdfWeightedTerms(Query query, IndexReader reader, string fieldName)
 {
     WeightedTerm[] terms = GetTerms(query, false, fieldName);
     int totalNumDocs = reader.NumDocs();
     foreach (WeightedTerm t in terms)
     {
         try
         {
             int docFreq = reader.DocFreq(new Term(fieldName, t.Term));
             // docFreq counts deletes
             if (totalNumDocs < docFreq)
             {
                 docFreq = totalNumDocs;
             }
             //IDF algorithm taken from DefaultSimilarity class
             var idf = (float)(Math.Log((float)totalNumDocs / (double)(docFreq + 1)) + 1.0);
             t.Weight *= idf;
         }
         catch (IOException e)
         {
             //ignore
         }
     }
     return terms;
 }
开发者ID:Cefa68000,项目名称:lucenenet,代码行数:33,代码来源:QueryTermExtractor.cs

示例9: dispatcherTimer_Tick

        void dispatcherTimer_Tick(object sender, EventArgs e)
        {
            _infoWindow.IsOpen = false;

            QueryTask queryTask =
                new QueryTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/4");
            Query query = new Query()
            {
                Geometry = _tapPoint,
                OutSpatialReference = MyMap.SpatialReference
            };
            query.OutFields.Add("NAME");

            queryTask.ExecuteCompleted += (s, evt) =>
            {
                if (evt.FeatureSet.Features.Count > 0)
                {
                    _infoWindow.Anchor = _tapPoint;
                    (_infoWindow.Content as TextBlock).Text = evt.FeatureSet.Features[0].Attributes["NAME"] as string;
                    _infoWindow.IsOpen = true;
                }
            };
            queryTask.ExecuteAsync(query);
            _dispatcherTimer.Stop();
        }
开发者ID:Esri,项目名称:arcgis-samples-winphone,代码行数:25,代码来源:InfoWindowDynamic.xaml.cs

示例10: FetchAll

 public URLTagsExtCollection FetchAll()
 {
     URLTagsExtCollection coll = new URLTagsExtCollection();
     Query qry = new Query(URLTagsExt.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:rafathan,项目名称:OriginalIntranet,代码行数:7,代码来源:URLTagsExtController.cs

示例11: FetchAll

 public DmucDiachinhCollection FetchAll()
 {
     DmucDiachinhCollection coll = new DmucDiachinhCollection();
     Query qry = new Query(DmucDiachinh.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:khaha2210,项目名称:VXIS,代码行数:7,代码来源:DmucDiachinhController.cs

示例12: FetchAll

 public KcbDangkySokhamCollection FetchAll()
 {
     KcbDangkySokhamCollection coll = new KcbDangkySokhamCollection();
     Query qry = new Query(KcbDangkySokham.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:vmshis2020,项目名称:VMSHISServer,代码行数:7,代码来源:KcbDangkySokhamController.cs

示例13: MultiValueAttribute

		public void MultiValueAttribute() {
			Services subject = new Services(Meta, DataConnector);
			Query queryStories = new Query(Oid.FromToken("Story:1063", Meta));
			IAttributeDefinition ownersDef = Meta.GetAttributeDefinition("Story.Owners");
			queryStories.Selection.Add(ownersDef);
			QueryResult resultStories = subject.Retrieve(queryStories);

			Asset story = resultStories.Assets[0];
			Oid oldMember = Oid.FromToken("Member:1001", Meta);
			Oid newMember = Oid.FromToken("Member:20", Meta);
			IEnumerator owners = story.GetAttribute(ownersDef).Values.GetEnumerator();
			Assert.IsTrue(owners.MoveNext());
			Assert.AreEqual(oldMember, owners.Current);
			Assert.IsFalse(owners.MoveNext());

			story.AddAttributeValue(ownersDef, newMember);
			owners = story.GetAttribute(ownersDef).Values.GetEnumerator();
			Assert.IsTrue(owners.MoveNext());
			Assert.AreEqual(oldMember, owners.Current);
			Assert.IsTrue(owners.MoveNext());
			Assert.AreEqual(newMember, owners.Current);
			Assert.IsFalse(owners.MoveNext());

			story.RemoveAttributeValue(ownersDef, oldMember);
			owners = story.GetAttribute(ownersDef).Values.GetEnumerator();
			Assert.IsTrue(owners.MoveNext());
			Assert.AreEqual(newMember, owners.Current);
			Assert.IsFalse(owners.MoveNext());

			story.RemoveAttributeValue(ownersDef, newMember);
			owners = story.GetAttribute(ownersDef).Values.GetEnumerator();
			Assert.IsFalse(owners.MoveNext());
		}
开发者ID:RedwardsiPipeline,项目名称:VersionOne.SDK.NET.APIClient,代码行数:33,代码来源:MultiValueAttributeTester.cs

示例14: FetchAll

 public PGenuCollection FetchAll()
 {
     PGenuCollection coll = new PGenuCollection();
     Query qry = new Query(PGenu.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:unepwcmc,项目名称:sigtrade,代码行数:7,代码来源:PGenuController.cs

示例15: FetchAll

 public Registration1Collection FetchAll()
 {
     Registration1Collection coll = new Registration1Collection();
     Query qry = new Query(Registration1.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:Publiship,项目名称:WWI_CRM_folders,代码行数:7,代码来源:Registration1Controller.cs


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