public static SledLuaVarLookUpType FromCustomValues(SledLuaVarScopeType scope, SledLuaVarLookUpContextType context, IList <SledLuaVarNameTypePairType> namesAndTypes) { try { var lookUp = new DomNode(SledLuaSchema.SledLuaVarLookUpType.Type) .As <SledLuaVarLookUpType>(); lookUp.Scope = scope; lookUp.Context = context; foreach (var nameAndType in namesAndTypes) { lookUp.NamesAndTypes.Add((SledLuaVarNameTypePairType)nameAndType.Clone()); } lookUp.Index = 0; lookUp.StackLevel = 0; return(lookUp); } catch (Exception ex) { SledOutDevice.OutLineDebug( SledMessageType.Error, "{0}: Exception in FromCustomValues: {1}", typeof(SledLuaVarLookUpType), ex.Message); return(null); } }
public SledLuaWatchedCustomVariable(string alias, SledLuaVarScopeType scope, List <KeyValuePair <string, int> > pairs, Guid guid, ISledLuaWatchedCustomVariableRenderer renderer) { Alias = alias; Scope = scope; NamesAndTypes = new List <KeyValuePair <string, int> >(pairs); Guid = guid; Renderer = renderer; }
public SledLuaWatchedCustomVariable(string alias, SledLuaVarScopeType scope, List<KeyValuePair<string, int>> pairs, Guid guid, ISledLuaWatchedCustomVariableRenderer renderer) { Alias = alias; Scope = scope; NamesAndTypes = new List<KeyValuePair<string, int>>(pairs); Guid = guid; Renderer = renderer; }
/// <summary> /// Create project watch from custom values /// </summary> /// <param name="alias"></param> /// <param name="scope"></param> /// <param name="namesAndTypes"></param> /// <param name="guid"></param> /// <returns></returns> public static SledLuaProjectFilesWatchType CreateFromCustom(string alias, SledLuaVarScopeType scope, IList <SledLuaVarNameTypePairType> namesAndTypes, Guid guid) { var projectFilesWatch = new DomNode(SledLuaSchema.SledLuaProjectFilesWatchType.Type) .As <SledLuaProjectFilesWatchType>(); var luaLanguagePlugin = SledServiceInstance.TryGet <SledLuaLanguagePlugin>(); projectFilesWatch.Name = alias; projectFilesWatch.LanguagePlugin = luaLanguagePlugin; projectFilesWatch.Scope = scope; projectFilesWatch.Context = SledLuaVarLookUpContextType.WatchCustom; projectFilesWatch.Guid = guid; projectFilesWatch.LookUp = SledLuaVarLookUpType.FromCustomValues(scope, SledLuaVarLookUpContextType.WatchCustom, namesAndTypes); return(projectFilesWatch); }
public static string ToString(SledLuaVarScopeType value) { return(Enum.GetName(typeof(SledLuaVarScopeType), value)); }
public SledLuaWatchedCustomVariable(string alias, SledLuaVarScopeType scope, List <KeyValuePair <string, int> > pairs, Guid guid) : this(alias, scope, pairs, guid, null) { }
public LuaWatchLookupEnd(UInt16 iPluginid, SledLuaVarScopeType scope) : this() { PluginId = iPluginid; Scope = scope; }
public static SledLuaVarLookUpType FromCustomValues(SledLuaVarScopeType scope, SledLuaVarLookUpContextType context, IList<SledLuaVarNameTypePairType> namesAndTypes) { try { var lookUp = new DomNode(SledLuaSchema.SledLuaVarLookUpType.Type) .As<SledLuaVarLookUpType>(); lookUp.Scope = scope; lookUp.Context = context; foreach (var nameAndType in namesAndTypes) lookUp.NamesAndTypes.Add((SledLuaVarNameTypePairType)nameAndType.Clone()); lookUp.Index = 0; lookUp.StackLevel = 0; return lookUp; } catch (Exception ex) { SledOutDevice.OutLineDebug( SledMessageType.Error, "{0}: Exception in FromCustomValues: {1}", typeof(SledLuaVarLookUpType), ex.Message); return null; } }
public static string ToString(SledLuaVarScopeType value) { return Enum.GetName(typeof(SledLuaVarScopeType), value); }
public SledLuaWatchedCustomVariable(string alias, SledLuaVarScopeType scope, List<KeyValuePair<string, int>> pairs, Guid guid) : this(alias, scope, pairs, guid, null) { }
/// <summary> /// Create project watch from custom values /// </summary> /// <param name="alias"></param> /// <param name="scope"></param> /// <param name="namesAndTypes"></param> /// <param name="guid"></param> /// <returns></returns> public static SledLuaProjectFilesWatchType CreateFromCustom(string alias, SledLuaVarScopeType scope, IList<SledLuaVarNameTypePairType> namesAndTypes, Guid guid) { var projectFilesWatch = new DomNode(SledLuaSchema.SledLuaProjectFilesWatchType.Type) .As<SledLuaProjectFilesWatchType>(); var luaLanguagePlugin = SledServiceInstance.TryGet<SledLuaLanguagePlugin>(); projectFilesWatch.Name = alias; projectFilesWatch.LanguagePlugin = luaLanguagePlugin; projectFilesWatch.Scope = scope; projectFilesWatch.Context = SledLuaVarLookUpContextType.WatchCustom; projectFilesWatch.Guid = guid; projectFilesWatch.LookUp = SledLuaVarLookUpType.FromCustomValues(scope, SledLuaVarLookUpContextType.WatchCustom, namesAndTypes); return projectFilesWatch; }