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

C# Generic.Dictionary类代码示例

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

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



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

示例1: ShowPage

 protected void ShowPage()
 {
     UsersData users = new UsersData(MapPath("."));
     ImagesData images = new ImagesData(MapPath("."));
     var image = new System.Collections.Generic.Dictionary<string, string>();
     if ((string)Request.QueryString["new"] == "true")
     {
         MultiView_Char.SetActiveView(View_NewChar);
         image["imageName"] = "新しい文字";
     }
     else if (Request.QueryString["id"] != null)
     {
         MultiView_Char.SetActiveView(View_ShowChar);
         image = images.FindImageId((string)Request.QueryString["id"]);
         Label_UserName.Text = users.FindUserID(image["userID"])["userName"];
         Image_Char.ImageUrl = string.Format("images/{0}.{1}", image["imageID"], image["imageType"]);
         TextBox_CharName.Text = image["imageName"];
     }
     else
     {
         Response.Redirect("index.aspx");
     }
     if (TextBox_NewCharName.Text == "")
     {
         TextBox_NewCharName.Text = image["imageName"];
     }
     Literal_Title.Text = image["imageName"];
     Literal_HeaderTitle.Text = image["imageName"];
     string userID = (string)Session["userID"];
     Literal_NavTop.Text = PageKits.generateNavTopContent(userID, users.FindUserID(userID)["userName"]);
 }
开发者ID:ne-sachirou,项目名称:yUsin-1,代码行数:31,代码来源:char.aspx.cs


示例2: InitDataDefinitions

		public static void InitDataDefinitions() {
			if (!initCache) {
                imageDictionary = new System.Collections.Generic.Dictionary<string, DefImage>();
                animationDictionary = new System.Collections.Generic.Dictionary<string, DefAnimation>();
				initCache = true;
			}
		}
开发者ID:207h2Flogintvg,项目名称:LGame,代码行数:7,代码来源:LNDataCache.cs


示例3: ToDictionary

 internal static System.Collections.Generic.Dictionary<string, string> ToDictionary(GeometryThiessenAnalystParameters geometryThiessenParams)
 {
     System.Collections.Generic.Dictionary<string, string> dict = new System.Collections.Generic.Dictionary<string, string>();
     if (geometryThiessenParams.ClipRegion != null)
     {
         dict.Add("clipRegion", ServerGeometry.ToJson(geometryThiessenParams.ClipRegion));
     }
     dict.Add("createResultDataset", geometryThiessenParams.CreateResultDataset.ToString(System.Globalization.CultureInfo.InvariantCulture).ToLower());
     dict.Add("resultDatasetName", geometryThiessenParams.ResultDatasetName.ToString(System.Globalization.CultureInfo.InvariantCulture));
     dict.Add("resultDatasourceName", geometryThiessenParams.ResultDatasourceName.ToString(System.Globalization.CultureInfo.InvariantCulture));
     dict.Add("returnResultRegion", geometryThiessenParams.ReturnResultRegion.ToString(System.Globalization.CultureInfo.InvariantCulture).ToLower());
     if (geometryThiessenParams.Points.Count > 0)
     {
         string points_str = "[";
         int count = geometryThiessenParams.Points.Count;
         for (int i = 0; i < count; i++)
         {
             Point2D point = geometryThiessenParams.Points[i];
             var point_str = "{";
             point_str+=String.Format("\"y\":{0},\"x\":{1}", point.Y, point.X);
             point_str += "}";
             points_str += point_str;
             if (i == count - 1)
             {
                 points_str += "]";                    }
             else
             {
                 points_str+=",";
             }
         }
         dict.Add("points", points_str);
     }
     return dict;
 }
开发者ID:SuperMap,项目名称:iClient-for-Silverlight,代码行数:34,代码来源:GeometryThiessenAnalystParameters.cs


示例4: List

 public void List()
 {
     System.Collections.Generic.IDictionary<string, object> uriArguments = new System.Collections.Generic.Dictionary<string, object>();
     var accept = new string[0];
     var contentType = new string[0];
     Call(Verb.GET, "/type/#GET", accept, contentType, uriArguments);
 }
开发者ID:alien-mcl,项目名称:URSA,代码行数:7,代码来源:TypeClient.cs


示例5: getShortestDistance

        //also reference to Algorithm.TreeAndGraph.Floyd and Algorithm.TreeAndGraph.Dijkstra
        public static int getShortestDistance(TreeAndGraph.GraphNode start, TreeAndGraph.GraphNode end)
        {
            System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<TreeAndGraph.GraphNode>> tab
                = new System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<TreeAndGraph.GraphNode>>();
            System.Collections.Generic.List<TreeAndGraph.GraphNode> list = new System.Collections.Generic.List<TreeAndGraph.GraphNode>();
            int count = 1;
            list.Add(start);
            tab.Add(count, list);
            while (true)
            {
                System.Collections.Generic.List<TreeAndGraph.GraphNode> gn_list = tab[count];
                ++count;
                if (!tab.ContainsKey(count))
                {
                    list = new System.Collections.Generic.List<TreeAndGraph.GraphNode>();
                    tab.Add(count, list);
                }
                foreach (TreeAndGraph.GraphNode gn in gn_list)
                {

                    foreach (TreeAndGraph.GraphNode node in gn.Nodes)
                    {
                        if (node == end)
                        {
                            return count;
                        }

                        tab[count].Add(node);
                    }
                }
            }
        }
开发者ID:Sanqiang,项目名称:Algorithm-Win,代码行数:33,代码来源:Q31.cs


示例6: AsDictionary

 public override System.Collections.Generic.IDictionary<string, object> AsDictionary()
 {
     System.Collections.Generic.Dictionary<string, object> result = new System.Collections.Generic.Dictionary<string, object>();
     result["LastAppliedEventId"] = this.LastAppliedEventId;
     result["Value"] = this.Value;
     return result;
 }
开发者ID:Bee-Htcpcp,项目名称:OrleansEventJournal,代码行数:7,代码来源:orleans.codegen.cs


示例7: InitializeObjects

 private void InitializeObjects()
 {
     this._updateDataTimer = new Timer();
     this._updateDataTimer.Interval = this._updateDataInterval;
     this._updateDataTimer.Tick += new System.EventHandler(this._updateDataTimer_Tick);
     this._OldBetListHistory = new Dictionary<string, DateTime>();
 }
开发者ID:nikersch,项目名称:BuonComIbetSbobet3In1Bet,代码行数:7,代码来源:IbetSubEngine.cs


示例8: ToDictionary

        internal static System.Collections.Generic.Dictionary<string, string> ToDictionary(DatasetBufferAnalystParameters datasetBufferParams)
        {
            System.Collections.Generic.Dictionary<string, string> dict = new System.Collections.Generic.Dictionary<string, string>();
            dict.Add("isAttributeRetained", datasetBufferParams.IsAttributeRetained.ToString().ToLower());
            dict.Add("isUnion", datasetBufferParams.IsUnion.ToString().ToLower());

            string dataReturnOption = "{\"dataReturnMode\": \"RECORDSET_ONLY\",\"deleteExistResultDataset\": true,";
            dataReturnOption += string.Format("\"expectCount\":{0}", datasetBufferParams.MaxReturnRecordCount);
            dataReturnOption += "}";
            dict.Add("dataReturnOption", dataReturnOption);

            if (datasetBufferParams.FilterQueryParameter != null)
            {
                dict.Add("filterQueryParameter", FilterParameter.ToJson(datasetBufferParams.FilterQueryParameter));
            }
            else
            {
                dict.Add("filterQueryParameter", FilterParameter.ToJson(new FilterParameter()));
            }

            if (datasetBufferParams.BufferSetting != null)
            {
                dict.Add("bufferAnalystParameter", BufferSetting.ToJson(datasetBufferParams.BufferSetting));
            }
            else
            {
                dict.Add("bufferAnalystParameter", BufferSetting.ToJson(new BufferSetting()));
            }

            return dict;
        }
开发者ID:SuperMap,项目名称:iClient-for-Win8,代码行数:31,代码来源:DatasetBufferAnalystParameters.cs


示例9: Invoke

 public override Task Invoke(IOwinContext ctx)
 {
     var requestMethod = ctx.Request.Method;
     var routeParams = new System.Collections.Generic.Dictionary<string, object>();
     string remainder;
     var path = ctx.Request.Path.Value;
     var match = MatchMethodAndTemplate(ctx, path);
     if (match == null)
     {
         return Next.Invoke(ctx);
     }
     var env = ctx.Environment;
     RouteParams.Merge(env, match.extracted);
     var oldBase = ctx.Request.PathBase;
     var oldPath = ctx.Request.Path;
     ctx.Request.PathBase = new PathString(oldBase + match.pathMatched);
     ctx.Request.Path = new PathString(match.pathRemaining);
     var restore = new Action<Task>(task => restorePaths(ctx, oldBase, oldPath));
     if (options.app != null)
     {
         return options.app.Invoke(env).ContinueWith(restore, TaskContinuationOptions.ExecuteSynchronously);
     }
     else
     {
         return options.branch.Invoke(ctx).ContinueWith(restore, TaskContinuationOptions.ExecuteSynchronously);
     }
 }
开发者ID:Xamarui,项目名称:OwinUtils,代码行数:27,代码来源:RouteMiddleware.cs


示例10: RemoveDuplicateFromUnsortedList

        public static LinkedList<int> RemoveDuplicateFromUnsortedList(LinkedList<int> linkedList)
        {
            if (linkedList == null)
                throw new ArgumentNullException("linkedList");

            var hash = new System.Collections.Generic.Dictionary<int, bool>();
            LinkedListNode<int> currentNode = linkedList.Root;
            LinkedListNode<int> previous = null;

            while (currentNode != null)
            {
                int data = currentNode.Data;
                if (hash.ContainsKey(data))
                {
                    previous.Next = currentNode.Next;
                }
                else
                {
                    hash.Add(data, true);
                    previous = currentNode;
                }
                currentNode = currentNode.Next;
            }
            return linkedList;
        }
开发者ID:adilmughal,项目名称:Algorithms-and-Programming-Problems,代码行数:25,代码来源:LinkedListProblems.cs


示例11: ToRelative

        public string ToRelative(string DateString)
        {
            DateTime theDate = Convert.ToDateTime(DateString);
            System.Collections.Generic.Dictionary<long, string> thresholds = new System.Collections.Generic.Dictionary<long, string>();
            int minute = 60;
            int hour = 60 * minute;
            int day = 24 * hour;
            thresholds.Add(60, "{0} seconds ago");
            thresholds.Add(minute * 2, "a minute ago");
            thresholds.Add(45 * minute, "{0} minutes ago");
            thresholds.Add(120 * minute, "an hour ago");
            thresholds.Add(day, "{0} hours ago");
            thresholds.Add(day * 2, "yesterday");
            // thresholds.Add(day * 30, "{0} days ago");
            thresholds.Add(day * 365, "{0} days ago");
            thresholds.Add(long.MaxValue, "{0} years ago");

            long since = (DateTime.Now.Ticks - theDate.Ticks) / 10000000;
            foreach (long threshold in thresholds.Keys)
            {
                if (since < threshold)
                {
                    TimeSpan t = new TimeSpan((DateTime.Now.Ticks - theDate.Ticks));
                    return string.Format(thresholds[threshold], (t.Days > 365 ? t.Days / 365 : (t.Days > 0 ? t.Days : (t.Hours > 0 ? t.Hours : (t.Minutes > 0 ? t.Minutes : (t.Seconds > 0 ? t.Seconds : 0))))).ToString());
                }
            }
            return "";
        }
开发者ID:ArupAus,项目名称:issue-tracker,代码行数:28,代码来源:RelativeDate.cs


示例12: constructor

	static public int constructor(IntPtr l) {
		try {
			int argc = LuaDLL.lua_gettop(l);
			System.Collections.Generic.Dictionary<System.Int32,System.String> o;
			if(argc==1){
				o=new System.Collections.Generic.Dictionary<System.Int32,System.String>();
				pushValue(l,true);
				pushValue(l,o);
				return 2;
			}
			else if(matchType(l,argc,2,typeof(IEqualityComparer<System.Int32>))){
				System.Collections.Generic.IEqualityComparer<System.Int32> a1;
				checkType(l,2,out a1);
				o=new System.Collections.Generic.Dictionary<System.Int32,System.String>(a1);
				pushValue(l,true);
				pushValue(l,o);
				return 2;
			}
			else if(matchType(l,argc,2,typeof(IDictionary<System.Int32,System.String>))){
				System.Collections.Generic.IDictionary<System.Int32,System.String> a1;
				checkType(l,2,out a1);
				o=new System.Collections.Generic.Dictionary<System.Int32,System.String>(a1);
				pushValue(l,true);
				pushValue(l,o);
				return 2;
			}
			else if(matchType(l,argc,2,typeof(int))){
				System.Int32 a1;
				checkType(l,2,out a1);
				o=new System.Collections.Generic.Dictionary<System.Int32,System.String>(a1);
				pushValue(l,true);
				pushValue(l,o);
				return 2;
			}
			else if(matchType(l,argc,2,typeof(IDictionary<System.Int32,System.String>),typeof(IEqualityComparer<System.Int32>))){
				System.Collections.Generic.IDictionary<System.Int32,System.String> a1;
				checkType(l,2,out a1);
				System.Collections.Generic.IEqualityComparer<System.Int32> a2;
				checkType(l,3,out a2);
				o=new System.Collections.Generic.Dictionary<System.Int32,System.String>(a1,a2);
				pushValue(l,true);
				pushValue(l,o);
				return 2;
			}
			else if(matchType(l,argc,2,typeof(int),typeof(IEqualityComparer<System.Int32>))){
				System.Int32 a1;
				checkType(l,2,out a1);
				System.Collections.Generic.IEqualityComparer<System.Int32> a2;
				checkType(l,3,out a2);
				o=new System.Collections.Generic.Dictionary<System.Int32,System.String>(a1,a2);
				pushValue(l,true);
				pushValue(l,o);
				return 2;
			}
			return error(l,"New object failed.");
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
开发者ID:xclouder,项目名称:godbattle,代码行数:60,代码来源:Lua_System_Collections_Generic_Dictionary_2_int_string.cs


示例13: XMLTokener

		static XMLTokener()
		{
			/*
			Copyright (c) 2002 JSON.org
			
			Permission is hereby granted, free of charge, to any person obtaining a copy
			of this software and associated documentation files (the "Software"), to deal
			in the Software without restriction, including without limitation the rights
			to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
			copies of the Software, and to permit persons to whom the Software is
			furnished to do so, subject to the following conditions:
			
			The above copyright notice and this permission notice shall be included in all
			copies or substantial portions of the Software.
			
			The Software shall be used for Good, not Evil.
			
			THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
			IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
			FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
			AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
			LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
			OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
			SOFTWARE.
			*/
			entity = new System.Collections.Generic.Dictionary<string, char>(8);
			entity["amp"] = org.json.XML.AMP;
			entity["apos"] = org.json.XML.APOS;
			entity["gt"] = org.json.XML.GT;
			entity["lt"] = org.json.XML.LT;
			entity["quot"] = org.json.XML.QUOT;
		}
开发者ID:davidraleigh,项目名称:geometry-api-cs-tests,代码行数:32,代码来源:XMLTokener.cs


示例14: saveInitialPositions

 private void saveInitialPositions()
 {
     initialPositions = new System.Collections.Generic.Dictionary<int, Vector3>();
     foreach(GameObject obj in GameObject.FindGameObjectsWithTag("respawn")) {
         initialPositions.Add(obj.GetInstanceID(), obj.rigidbody.position);
     }
 }
开发者ID:Janin-K,项目名称:SG,代码行数:7,代码来源:GameControl.cs


示例15: LSTRFont

 public LSTRFont(LFont font, bool anti, char[] additionalChars)
 {
     if (displays == null)
     {
         displays = new System.Collections.Generic.Dictionary<string, Loon.Core.Graphics.Opengl.LTextureBatch.GLCache>(totalCharSet);
     }
     else
     {
         displays.Clear();
     }
     this.useCache = true;
     this.font = font;
     this.fontSize = font.GetSize();
     this.ascent = font.GetAscent();
     this.antiAlias = anti;
     if (antiAlias)
     {
         if (trueFont == null)
         {
             trueFont = LFont.GetTrueFont();
         }
         if (additionalChars != null && additionalChars.Length > (textureWidth / trueFont.GetSize()))
         {
             this.textureWidth *= 2;
             this.textureHeight *= 2;
         }
         this.fontScale = (float)fontSize / (float)trueFont.GetSize();
         this.Make(trueFont, additionalChars);
     }
     else
     {
         this.Make(this.font, additionalChars);
     }
 }
开发者ID:ordanielcmessias,项目名称:LGame,代码行数:34,代码来源:LSTRFont.cs


示例16: ToDictionary

        internal static System.Collections.Generic.Dictionary<string, string> ToDictionary(DatasetSurfaceAnalystParameters datasetSurfaceAnalystParams)
        {
            var dict = new System.Collections.Generic.Dictionary<string, string>();

            if (datasetSurfaceAnalystParams.ParametersSetting != null)
            {
                dict.Add("extractParameter", SurfaceAnalystParametersSetting.ToJson(datasetSurfaceAnalystParams.ParametersSetting));
            }
            else
            {
                dict.Add("extractParameter", SurfaceAnalystParametersSetting.ToJson(new SurfaceAnalystParametersSetting()));
            }

            string resultSetting = string.Format(System.Globalization.CultureInfo.InvariantCulture, "\"dataReturnMode\":\"RECORDSET_ONLY\",\"expectCount\":{0}", datasetSurfaceAnalystParams.MaxReturnRecordCount);
            resultSetting = "{" + resultSetting + "}";
            dict.Add("resultSetting", resultSetting);

            if (datasetSurfaceAnalystParams.FilterQueryParam != null)
            {
                dict.Add("filterQueryParameter", FilterParameter.ToJson(datasetSurfaceAnalystParams.FilterQueryParam));
            }

            if (!string.IsNullOrEmpty(datasetSurfaceAnalystParams.ZValueFieldName) && !string.IsNullOrWhiteSpace(datasetSurfaceAnalystParams.ZValueFieldName))
            {
                dict.Add("zValueFieldName", "\"" + datasetSurfaceAnalystParams.ZValueFieldName + "\"");
            }
            else
            {
                dict.Add("zValueFieldName","\"\"");
            }

            dict.Add("resolution", datasetSurfaceAnalystParams.Resolution.ToString(System.Globalization.CultureInfo.InvariantCulture));
            return dict;
        }
开发者ID:SuperMap,项目名称:iClient-for-Silverlight,代码行数:34,代码来源:DatasetSurfaceAnalystParameters.cs


示例17: AnimationGlitchSpriteSingleton

        // CONSTRUCTOR ---------------------------------------------------------------------------------------
        public AnimationGlitchSpriteSingleton()
        {
            if(!isOkToCreate) Console.WriteLine (this + "is a singleton. Use get instance");
            if(isOkToCreate){
                FileStream fileStream = File.OpenRead("/Application/assets/animation/leftGlitch/leftOneLine.xml");
                StreamReader fileStreamReader = new StreamReader(fileStream);
                string xml = fileStreamReader.ReadToEnd();
                fileStreamReader.Close();
                fileStream.Close();
                XDocument doc = XDocument.Parse(xml);

                var lines = from sprite in doc.Root.Elements("sprite")
                    select new {
                        Name = sprite.Attribute("n").Value,
                        X1 = (int)sprite.Attribute ("x"),
                        Y1 = (int)sprite.Attribute ("y"),
              			Height = (int)sprite.Attribute ("h"),
              			Width = (int)sprite.Attribute("w"),
            };

               				_sprites = new Dictionary<string,Sce.PlayStation.HighLevel.GameEngine2D.Base.Vector2i>();
                foreach(var curLine in lines)
                {
                    _sprites.Add(curLine.Name,new Vector2i((curLine.X1/curLine.Width),(curLine.Y1/curLine.Height)));
                //note if you add more than one line of sprites you must do this
                // _sprites.Add(curLine.Name,new Vector2i((curLine.X1/curLine.Width),1-(curLine.Y1/curLine.Height)));
                //where 9 is the num of rows minus 1 to reverse the order :/
               			}
               				_texture = new Texture2D("/Application/assets/animation/leftGlitch/leftOneLine.png", false);
               				_textureInfo = new TextureInfo(_texture,new Vector2i(5,1));
            }
              		if(!isOkToCreate) {
                Console.WriteLine("this is a singleton. access via get Instance");
            }
        }
开发者ID:phoenixperry,项目名称:crystallography,代码行数:36,代码来源:AnimationGlitchSpriteSingleton.cs


示例18: DetermineVersion

 private static SQLCEVersion DetermineVersion(string filename)
 {
     var versionDictionary = new System.Collections.Generic.Dictionary<int, SQLCEVersion> 
 { 
     { 0x73616261, SQLCEVersion.SQLCE20 }, 
     { 0x002dd714, SQLCEVersion.SQLCE30},
     { 0x00357b9d, SQLCEVersion.SQLCE35},
     { 0x003d0900, SQLCEVersion.SQLCE40}
 };
     int versionLONGWORD = 0;
     try
     {
         using (var fs = new System.IO.FileStream(filename, System.IO.FileMode.Open))
         {
             fs.Seek(16, System.IO.SeekOrigin.Begin);
             using (System.IO.BinaryReader reader = new System.IO.BinaryReader(fs))
             {
                 versionLONGWORD = reader.ReadInt32();
             }
         }
     }
     catch
     {
         throw;
     }
     if (versionDictionary.ContainsKey(versionLONGWORD))
     {
         return versionDictionary[versionLONGWORD];
     }
     else
     {
         throw new ApplicationException("Unable to determine database file version");
     }
 }
开发者ID:herohut,项目名称:elab,代码行数:34,代码来源:SqlCeHelper.cs


示例19: ToDictionary

 /// <summary>
 /// Serialises the keys object as a media-storage-query-compatible, JSON-friendly data-structure.
 /// </summary>
 /// <returns>
 /// A JSON-friendly dictionary representation of the keys object in its current state.
 /// </returns>
 internal virtual System.Collections.Generic.IDictionary<string, object> ToDictionary()
 {
     System.Collections.Generic.IDictionary<string, object> dictionary = new System.Collections.Generic.Dictionary<string, object>();
     dictionary.Add("read", this.Read);
     dictionary.Add("write", this.Write);
     return dictionary;
 }
开发者ID:flan,项目名称:media-storage,代码行数:13,代码来源:Keys.cs


示例20: RollBackLast

		//Rolls back index to a chosen ID
		private void  RollBackLast(int id)
		{
			
			// System.out.println("Attempting to rollback to "+id);
			System.String ids = "-" + id;
			IndexCommit last = null;
			System.Collections.ICollection commits = IndexReader.ListCommits(dir);
			for (System.Collections.IEnumerator iterator = commits.GetEnumerator(); iterator.MoveNext(); )
			{
				IndexCommit commit = (IndexCommit) iterator.Current;
                System.Collections.Generic.IDictionary<string, string> ud = commit.GetUserData();
				if (ud.Count > 0)
					if (((System.String) ud["index"]).EndsWith(ids))
						last = commit;
			}
			
			if (last == null)
				throw new System.SystemException("Couldn't find commit point " + id);
			
			IndexWriter w = new IndexWriter(dir, new WhitespaceAnalyzer(), new RollbackDeletionPolicy(this, id), MaxFieldLength.UNLIMITED, last);
            System.Collections.Generic.IDictionary<string, string> data = new System.Collections.Generic.Dictionary<string, string>();
			data["index"] = "Rolled back to 1-" + id;
			w.Commit(data);
			w.Close();
		}
开发者ID:VirtueMe,项目名称:ravendb,代码行数:26,代码来源:TestTransactionRollback.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Generic.IDictionary类代码示例发布时间:2022-05-24
下一篇:
C# Collections.Generic类代码示例发布时间: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