本文整理汇总了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;
}
示例2: FetchAll
public StudyHistoryCollection FetchAll()
{
var coll = new StudyHistoryCollection();
var qry = new Query(StudyHistory.Schema);
coll.LoadAndCloseReader(qry.ExecuteReader());
return coll;
}
示例3: FetchAll
public DisposeTableCollection FetchAll()
{
DisposeTableCollection coll = new DisposeTableCollection();
Query qry = new Query(DisposeTable.Schema);
coll.LoadAndCloseReader(qry.ExecuteReader());
return coll;
}
示例4: FetchAll
public QheDoituongThuocCollection FetchAll()
{
QheDoituongThuocCollection coll = new QheDoituongThuocCollection();
Query qry = new Query(QheDoituongThuoc.Schema);
coll.LoadAndCloseReader(qry.ExecuteReader());
return coll;
}
示例5: FetchAll
public B3LookupContactIDCollection FetchAll()
{
B3LookupContactIDCollection coll = new B3LookupContactIDCollection();
Query qry = new Query(B3LookupContactID.Schema);
coll.LoadAndCloseReader(qry.ExecuteReader());
return coll;
}
示例6: FetchAll
public TDutruThuocCollection FetchAll()
{
TDutruThuocCollection coll = new TDutruThuocCollection();
Query qry = new Query(TDutruThuoc.Schema);
coll.LoadAndCloseReader(qry.ExecuteReader());
return coll;
}
示例7: FetchAll
public AspnetPersonalizationAllUserCollection FetchAll()
{
AspnetPersonalizationAllUserCollection coll = new AspnetPersonalizationAllUserCollection();
Query qry = new Query(AspnetPersonalizationAllUser.Schema);
coll.LoadAndCloseReader(qry.ExecuteReader());
return coll;
}
示例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;
}
示例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();
}
示例10: FetchAll
public URLTagsExtCollection FetchAll()
{
URLTagsExtCollection coll = new URLTagsExtCollection();
Query qry = new Query(URLTagsExt.Schema);
coll.LoadAndCloseReader(qry.ExecuteReader());
return coll;
}
示例11: FetchAll
public DmucDiachinhCollection FetchAll()
{
DmucDiachinhCollection coll = new DmucDiachinhCollection();
Query qry = new Query(DmucDiachinh.Schema);
coll.LoadAndCloseReader(qry.ExecuteReader());
return coll;
}
示例12: FetchAll
public KcbDangkySokhamCollection FetchAll()
{
KcbDangkySokhamCollection coll = new KcbDangkySokhamCollection();
Query qry = new Query(KcbDangkySokham.Schema);
coll.LoadAndCloseReader(qry.ExecuteReader());
return coll;
}
示例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());
}
示例14: FetchAll
public PGenuCollection FetchAll()
{
PGenuCollection coll = new PGenuCollection();
Query qry = new Query(PGenu.Schema);
coll.LoadAndCloseReader(qry.ExecuteReader());
return coll;
}
示例15: FetchAll
public Registration1Collection FetchAll()
{
Registration1Collection coll = new Registration1Collection();
Query qry = new Query(Registration1.Schema);
coll.LoadAndCloseReader(qry.ExecuteReader());
return coll;
}