本文整理汇总了C#中System.Local类的典型用法代码示例。如果您正苦于以下问题:C# Local类的具体用法?C# Local怎么用?C# Local使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Local类属于System命名空间,在下文中一共展示了Local类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: CreateDoor
public uint CreateDoor(uint roomId, string destinationRoom, string destinationSpawn, Rectangle rectangle)
{
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(rectangle.Left, rectangle.Top),
Radius = 32f,
RoomID = roomId
};
game.PositionComponent[entityID] = position;
Collideable collideable = new Collideable()
{
EntityID = entityID,
RoomID = position.RoomID,
Bounds = new RectangleBounds(rectangle.Left,rectangle.Top,rectangle.Width,rectangle.Height),
// Center and Radius TBD Later
};
game.CollisionComponent[entityID] = collideable;
Local local = new Local()
{
EntityID = entityID,
};
game.LocalComponent[entityID] = local;
Door door = new Door()
{
EntityID = entityID,
DestinationRoom = destinationRoom,
DestinationSpawnName = destinationSpawn,
Locked = false,
Closed = false,
};
game.DoorComponent[entityID] = door;
/*Sprite sprite = new Sprite()
{
EntityID = entityID,
// TODO: SpriteSheet and SpriteBounds need a sprite and its bounds. I'm
// waiting to see what the dungeons look like before choosing a sprite
// so that the door sprite matches the dungeon theme.
SpriteSheet = null,
SpriteBounds = new Rectangle(0, 0, 0, 0),
};
game.SpriteComponent[entityID] = sprite;*/
return entityID;
}
开发者ID:malinajirka,项目名称:DungeonCrawler,代码行数:55,代码来源:DoorFactory.cs
示例17: GetLocalVarIndex
protected virtual int GetLocalVarIndex(Local/*!*/ loc) {
object index = this.localsIndex[loc.UniqueKey];
if (index is int) return (int)index;
Type ltype = loc.Type == null ? null : loc.Type.GetRuntimeType();
if (ltype == null) { Debug.Fail(""); return 0; }
LocalBuilder locb = this.ILGenerator.DeclareLocal(ltype, loc.Pinned);
int i = this.locals.Count;
this.locals.Add(locb);
this.localsIndex[loc.UniqueKey] = i;
return i;
}
开发者ID:modulexcite,项目名称:IL2JS,代码行数:11,代码来源:ILGenerator.cs
示例18: View
public Local.SniffDirectory View(Local.Settings settings, Local.SniffDirectory sniffDirectory)
{
this.sniffDirectory = sniffDirectory.Clone();
this.settings = settings;
UpdateViewer();
var result = this.ShowDialog();
if (result == DialogResult.OK)
return this.sniffDirectory;
else
return null;
}
开发者ID:devmaximus,项目名称:MaximusParserX,代码行数:14,代码来源:frmSniffDirectory.cs
示例19: EmitDecrypt
public IEnumerable<Instruction> EmitDecrypt(MethodDef init, REContext ctx, Local block, Local key) {
for (int i = 0; i < 0x10; i++) {
yield return Instruction.Create(OpCodes.Ldloc, block);
yield return Instruction.Create(OpCodes.Ldc_I4, i);
yield return Instruction.Create(OpCodes.Ldloc, block);
yield return Instruction.Create(OpCodes.Ldc_I4, i);
yield return Instruction.Create(OpCodes.Ldelem_U4);
yield return Instruction.Create(OpCodes.Ldloc, key);
yield return Instruction.Create(OpCodes.Ldc_I4, i);
yield return Instruction.Create(OpCodes.Ldelem_U4);
yield return Instruction.Create(OpCodes.Xor);
yield return Instruction.Create(OpCodes.Stelem_I4);
}
}
开发者ID:EmilZhou,项目名称:ConfuserEx,代码行数:14,代码来源:NormalMode.cs
示例20: AddOrUpdateItem
public void AddOrUpdateItem(Local.SniffDirectory sniffDirectory)
{
if (this.InvokeRequired)
{
this.Invoke(new DelegateManager.DelegateAddOrUpdateItem<Local.SniffDirectory>(AddOrUpdateItem), sniffDirectory);
}
else
{
lstView.BeginUpdate();
var key = sniffDirectory.Directory;
ListViewItem listviewitem = null;
if (!lstView.Items.ContainsKey(key))
{
listviewitem = lstView.Items.Add(key, sniffDirectory.Directory, 0);
listviewitem.SubItems.Add(sniffDirectory.SearchPattern);
listviewitem.SubItems.Add(sniffDirectory.Recursive.BoolValueYesNo());
listviewitem.SubItems.Add(sniffDirectory.GetFiles().Count.ToString());
}
else
{
listviewitem = lstView.Items[key];
listviewitem.SubItems[0].Text = sniffDirectory.Directory;
listviewitem.SubItems[1].Text = sniffDirectory.SearchPattern;
listviewitem.SubItems[2].Text = sniffDirectory.Recursive.BoolValueYesNo();
listviewitem.SubItems[3].Text = sniffDirectory.GetFiles().Count.ToString();
}
listviewitem.Checked = sniffDirectory.Include;
listviewitem.Tag = (Guid?)sniffDirectory.DataObjectGUID;
if (sniffDirectory.Include)
{
listviewitem.BackColor = !sniffDirectory.DirectoryExists() ? Color.Salmon : Color.LightGreen;
listviewitem.ForeColor = SystemColors.ControlText;
}
else
{
listviewitem.BackColor = Color.White;
listviewitem.ForeColor = Color.LightGray;
}
lstView.EndUpdate();
}
}
开发者ID:RaptorFactor,项目名称:devmaximus,代码行数:49,代码来源:frmSniffDirectoryList.cs
注:本文中的System.Local类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论