當前位置: 首頁>>代碼示例>>C#>>正文


C# System.Local類代碼示例

本文整理匯總了C#中System.Local的典型用法代碼示例。如果您正苦於以下問題:C# Local類的具體用法?C# Local怎麽用?C# Local使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Local類屬於System命名空間,在下文中一共展示了Local類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: EditVariableForm

        public EditVariableForm(Local local)
        {
            InitializeComponent();
            cbTypeSpecification.SelectedIndex = 0;

            RestoreVariable(local);
        }
開發者ID:AssassinUKG,項目名稱:dnEditor,代碼行數:7,代碼來源:EditVariableForm.cs

示例2: EmitDerivation

 public IEnumerable<Instruction> EmitDerivation(MethodDef method, ConfuserContext ctx, Local dst, Local src)
 {
     for (int i = 0; i < 0x10; i++) {
         yield return Instruction.Create(OpCodes.Ldloc, dst);
         yield return Instruction.Create(OpCodes.Ldc_I4, i);
         yield return Instruction.Create(OpCodes.Ldloc, dst);
         yield return Instruction.Create(OpCodes.Ldc_I4, i);
         yield return Instruction.Create(OpCodes.Ldelem_U4);
         yield return Instruction.Create(OpCodes.Ldloc, src);
         yield return Instruction.Create(OpCodes.Ldc_I4, i);
         yield return Instruction.Create(OpCodes.Ldelem_U4);
         switch (i % 3) {
             case 0:
                 yield return Instruction.Create(OpCodes.Xor);
                 break;
             case 1:
                 yield return Instruction.Create(OpCodes.Mul);
                 break;
             case 2:
                 yield return Instruction.Create(OpCodes.Add);
                 break;
         }
         yield return Instruction.Create(OpCodes.Stelem_I4);
     }
 }
開發者ID:GavinHwa,項目名稱:ConfuserEx,代碼行數:25,代碼來源:NormalDeriver.cs

示例3: GetMethodInfo

			public void GetMethodInfo(MethodKey key, out Parameter[] parameters, out Local[] locals, out ILVariable[] decLocals) {
				parameters = null;
				locals = null;
				decLocals = null;

				foreach (var textView in MainWindow.Instance.AllTextViews) {
					if (parameters != null && decLocals != null)
						break;

					var cm = textView.CodeMappings;
					if (cm == null)
						continue;
					MemberMapping mapping;
					if (!cm.TryGetValue(key, out mapping))
						continue;
					var method = mapping.MethodDefinition;
					if (mapping.LocalVariables != null && method.Body != null) {
						locals = method.Body.Variables.ToArray();
						decLocals = new ILVariable[method.Body.Variables.Count];
						foreach (var v in mapping.LocalVariables) {
							if (v.IsGenerated)
								continue;
							if (v.OriginalVariable == null)
								continue;
							if ((uint)v.OriginalVariable.Index >= decLocals.Length)
								continue;
							decLocals[v.OriginalVariable.Index] = v;
						}
					}

					parameters = method.Parameters.ToArray();
				}
			}
開發者ID:nakijun,項目名稱:dnSpy,代碼行數:33,代碼來源:LocalsControl.xaml.cs

示例4: CreateRoom

        public void CreateRoom(string TilemapName)
        {
            uint entityID = Entity.NextEntity();

            /*Texture2D spriteSheet = game.Content.Load<Texture2D>("");
            spriteSheet.Name = "";*/

            Position position = new Position()
            {
                EntityID = entityID,
                // Center and Radius TBD Later
                Center = new Vector2(0, 0),
                Radius = 32f,
            };
            game.PositionComponent[entityID] = position;

            Local local = new Local()
            {
                EntityID = entityID,
            };
            game.LocalComponent[entityID] = local;

            Room room = new Room()
            {
                EntityID = entityID,
                Tilemap = TilemapName,
            };
            game.RoomComponent[entityID] = room;
        }
開發者ID:sfike,項目名稱:DungeonCrawler,代碼行數:29,代碼來源:RoomFactory.cs

示例5: InitSettings

 public void InitSettings(Local.Settings settings)
 {
     this.Settings = settings;
     this.SniffDirectoryListPanel.UpdateViewer();
     this.SniffListPanel.UpdateViewer();
     
 }
開發者ID:RaptorFactor,項目名稱:devmaximus,代碼行數:7,代碼來源:UIManager.cs

示例6: GetMethodInfo

		public void GetMethodInfo(SerializedDnToken key, out Parameter[] parameters, out Local[] locals, out IILVariable[] decLocals) {
			parameters = null;
			locals = null;
			decLocals = null;

			foreach (var tab in fileTabManager.VisibleFirstTabs) {
				if (parameters != null && decLocals != null)
					break;

				var uiContext = tab.UIContext as ITextEditorUIContext;
				var cm = uiContext.TryGetCodeMappings();
				if (cm == null)
					continue;
				var mapping = cm.TryGetMapping(key);
				if (mapping == null)
					continue;
				var method = mapping.Method;
				if (mapping.LocalVariables != null && method.Body != null) {
					locals = method.Body.Variables.ToArray();
					decLocals = new IILVariable[method.Body.Variables.Count];
					foreach (var v in mapping.LocalVariables) {
						if (v.GeneratedByDecompiler)
							continue;
						if (v.OriginalVariable == null)
							continue;
						if ((uint)v.OriginalVariable.Index >= decLocals.Length)
							continue;
						decLocals[v.OriginalVariable.Index] = v;
					}
				}

				parameters = method.Parameters.ToArray();
			}
		}
開發者ID:GreenDamTan,項目名稱:dnSpy,代碼行數:34,代碼來源:MethodLocalProvider.cs

示例7: Update

 public Local Update(Local local)
 {
     DbEntityEntry entry = context.Entry(local);
     entry.State = EntityState.Modified;
     context.SaveChanges();
     return local;
 }
開發者ID:ViniciusOliveiraSI,項目名稱:TrabalhoFinalHugo,代碼行數:7,代碼來源:LocalRepository.cs

示例8: GetMethodInfo

		public void GetMethodInfo(ModuleTokenId key, out Parameter[] parameters, out Local[] locals, out SourceLocal[] decompilerLocals) {
			parameters = null;
			locals = null;
			decompilerLocals = null;

			foreach (var tab in documentTabService.VisibleFirstTabs) {
				if (parameters != null && decompilerLocals != null)
					break;

				var uiContext = tab.UIContext as IDocumentViewer;
				var methodDebugService = uiContext.TryGetMethodDebugService();
				if (methodDebugService == null)
					continue;
				var info = methodDebugService.TryGetMethodDebugInfo(key);
				if (info == null)
					continue;
				var method = info.Method;
				if (info.Locals.Length != 0 && method.Body != null) {
					locals = method.Body.Variables.ToArray();
					decompilerLocals = new SourceLocal[method.Body.Variables.Count];
					foreach (var v in info.Locals) {
						if ((uint)v.Local.Index >= decompilerLocals.Length)
							continue;
						decompilerLocals[v.Local.Index] = v;
					}
				}

				parameters = method.Parameters.ToArray();
			}
		}
開發者ID:manojdjoshi,項目名稱:dnSpy,代碼行數:30,代碼來源:MethodLocalProvider.cs

示例9: Encrypt

        public string Encrypt(string msg, int key, Local local)
        {
            SetLocal(local);

            var stringBuilder = new StringBuilder(msg.Length);
            int n = _abc.Length / 2;

            foreach (var item in msg)
            {
                var k = _abc.IndexOf(item);
                if (k != -1)
                {
                    k = (k + key) % n;
                    if (char.IsLower(item))
                    {
                        k += n;
                    }

                    stringBuilder.Append(_abc[k]);
                }
                else
                {
                    stringBuilder.Append(item);
                }
            }

            return stringBuilder.ToString();
        }
開發者ID:pavelkasyanov,項目名稱:MZI_Labs,代碼行數:28,代碼來源:CaesarСipher.cs

示例10: EmitDerivation

		public IEnumerable<Instruction> EmitDerivation(MethodDef method, ConfuserContext ctx, Local dst, Local src) {
			var ret = new List<Instruction>();
			var codeGen = new CodeGen(dst, src, method, ret);
			codeGen.GenerateCIL(derivation);
			codeGen.Commit(method.Body);
			return ret;
		}
開發者ID:EmilZhou,項目名稱:ConfuserEx,代碼行數:7,代碼來源:DynamicDeriver.cs

示例11: Create

        public Local Create(Local local)
        {
            Validator.Validate(local);

            var savedLocal = _localRepository.Save(local);

            return savedLocal;
        }
開發者ID:ViniciusOliveiraSI,項目名稱:TrabalhoFinalHugo,代碼行數:8,代碼來源:LocalService.cs

示例12: SourceLocal

		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="local">Local</param>
		/// <param name="name">Name used by the decompiler</param>
		public SourceLocal(Local local, string name) {
			if (local == null)
				throw new ArgumentNullException(nameof(local));
			if (name == null)
				throw new ArgumentNullException(nameof(name));
			Local = local;
			Name = name;
		}
開發者ID:manojdjoshi,項目名稱:dnSpy,代碼行數:13,代碼來源:SourceLocal.cs

示例13: Update

        public Local Update(Local local)
        {
            Validator.Validate(local);

            var updatedLocal = _localRepository.Update(local);

            return updatedLocal;
        }
開發者ID:ViniciusOliveiraSI,項目名稱:TrabalhoFinalHugo,代碼行數:8,代碼來源:LocalService.cs

示例14: Init

		public void Init(CilBody body) {
			if (inited)
				return;
			stateVar = new Local(ctx.Method.Module.CorLibTypes.Int32);
			body.Variables.Add(stateVar);
			body.InitLocals = true;
			Compile(body);
			inited = true;
		}
開發者ID:EmilZhou,項目名稱:ConfuserEx,代碼行數:9,代碼來源:ExpressionPredicate.cs

示例15: Var

		protected virtual Local Var(Variable var) {
			Local ret;
			if (!localMap.TryGetValue(var.Name, out ret)) {
				ret = new Local(Method.Module.CorLibTypes.UInt32);
				ret.Name = var.Name;
				localMap[var.Name] = ret;
			}
			return ret;
		}
開發者ID:EmilZhou,項目名稱:ConfuserEx,代碼行數:9,代碼來源:CILCodeGen.cs


注:本文中的System.Local類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。