Inheritance: Hashtable, IDictionary, ICollection, IEnumerable, ICloneable
コード例 #1
0
ファイル: Program.cs プロジェクト: cooclsee/hprose-dotnet
 static void Main(string[] args)
 {
     HashMap<string, string> map = new HashMap<string, string>();
     map[null] = "null";
     map["name"] = "Ma Bingyao";
     map["sex"] = "male";
     Console.WriteLine(map.Count);
     Console.WriteLine(((IDictionary<string, string>)map).Count);
     Console.WriteLine(((IDictionary)map).Contains(null));
     Console.WriteLine(((IDictionary)map).Contains("name"));
     Console.ReadKey();
 }
コード例 #2
0
		public override void Flush(ICollection<DocConsumerPerThread> threads, SegmentWriteState state)
		{
			var childThreadsAndFields = new HashMap<DocFieldConsumerPerThread, ICollection<DocFieldConsumerPerField>>();
			foreach(DocConsumerPerThread thread in threads)
			{
                DocFieldProcessorPerThread perThread = (DocFieldProcessorPerThread)thread;
				childThreadsAndFields[perThread.consumer] = perThread.Fields();
				perThread.TrimFields(state);
			}
			fieldsWriter.Flush(state);
			consumer.Flush(childThreadsAndFields, state);
			
			// Important to save after asking consumer to flush so
			// consumer can alter the FieldInfo* if necessary.  EG,
			// FreqProxTermsWriter does this with
			// FieldInfo.storePayload.
			System.String fileName = state.SegmentFileName(IndexFileNames.FIELD_INFOS_EXTENSION);
			fieldInfos.Write(state.directory, fileName);
            state.flushedFiles.Add(fileName);
		}
コード例 #3
0
 internal ValuesCollection(HashMap m, ICollection values)
 {
     this.m      = m;
     this.values = values;
 }
コード例 #4
0
 internal KeysCollection(HashMap m, ICollection keys)
 {
     this.m    = m;
     this.keys = keys;
 }
コード例 #5
0
ファイル: HashMap.cs プロジェクト: neatstudio/oh
 internal ValuesCollection(HashMap m, ICollection values) {
     this.m = m;
     this.values = values;
 }
コード例 #6
0
ファイル: HashMap.cs プロジェクト: neatstudio/oh
 internal KeysCollection(HashMap m, ICollection keys) {
     this.m = m;
     this.keys = keys;
 }