当前位置: 首页>>代码示例>>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;未经允许,请勿转载。