public override int GetHashCode() { int hash = 1; if (ConfigId != 0) { hash ^= ConfigId.GetHashCode(); } hash ^= skills_.GetHashCode(); if (FinalAttack != 0) { hash ^= FinalAttack.GetHashCode(); } if (FinalDefence != 0) { hash ^= FinalDefence.GetHashCode(); } if (FinalHealth != 0) { hash ^= FinalHealth.GetHashCode(); } if (FinalActionSpeed != 0) { hash ^= FinalActionSpeed.GetHashCode(); } return(hash); }
internal static bool GetCacheEntry(ConfigId id, int numKey, byte[] key, out byte[] data) { byte[] o = null; bool flag = GetCacheEntry(id, numKey, key, key.Length, JitHelpers.GetObjectHandleOnStack<byte[]>(ref o)); data = o; return flag; }
internal static bool GetCacheEntry(ConfigId id, int numKey, byte[] key, out byte[] data) { byte[] o = null; bool flag = GetCacheEntry(id, numKey, key, key.Length, JitHelpers.GetObjectHandleOnStack <byte[]>(ref o)); data = o; return(flag); }
internal static bool GetCacheEntry(ConfigId id, int numKey, byte[] key, out byte[] data) { byte[] array = null; bool cacheEntry = Config.GetCacheEntry(id, numKey, key, key.Length, JitHelpers.GetObjectHandleOnStack <byte[]>(ref array)); data = array; return(cacheEntry); }
[System.Security.SecurityCritical] // auto-generated internal static bool GetCacheEntry(ConfigId id, int numKey, byte[] key, out byte[] data) { byte[] retData = null; bool ret = GetCacheEntry(id, numKey, key, key.Length, JitHelpers.GetObjectHandleOnStack(ref retData)); data = retData; return(ret); }
internal static String GetStoreLocation(ConfigId configId) { if (configId == ConfigId.None) { return(null); } return(_GetStoreLocation(configId)); }
public override int GetHashCode() { const int prime = 31; int result = 17; result = prime * result + Type.GetHashCode(); result = prime * result + ConfigId.GetHashCode(); result = prime * result + InstanceId.GetHashCode(); return(result); }
/// <summary> /// GetHashCode /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { var hashCode = -1268746195; hashCode = hashCode * -1521134295 + InputId.GetHashCodeWithNullCheck(); hashCode = hashCode * -1521134295 + ConfigId.GetHashCodeWithNullCheck(); hashCode = hashCode * -1521134295 + Error.GetHashCodeWithNullCheck(); hashCode = hashCode * -1521134295 + Coverage.GetHashCodeWithNullCheck(); return(hashCode); }
internal static void AddCacheEntry(ConfigId id, int numKey, byte[] key, byte[] data) { int num = (int)id; int numKey1 = numKey; byte[] key1 = key; int length1 = key1.Length; byte[] data1 = data; int length2 = data1.Length; Config.AddCacheEntry((ConfigId)num, numKey1, key1, length1, data1, length2); }
internal static bool GetCacheEntry(ConfigId id, int numKey, byte[] key, out byte[] data) { byte[] o = (byte[])null; int num1 = (int)id; int numKey1 = numKey; byte[] key1 = key; int length = key1.Length; ObjectHandleOnStack objectHandleOnStack = JitHelpers.GetObjectHandleOnStack <byte[]>(ref o); int num2 = Config.GetCacheEntry((ConfigId)num1, numKey1, key1, length, objectHandleOnStack) ? 1 : 0; data = o; return(num2 != 0); }
public override int GetHashCode() { int hash = 1; if (ConfigId != 0) { hash ^= ConfigId.GetHashCode(); } if (Level != 0) { hash ^= Level.GetHashCode(); } return(hash); }
public static ConfigId GetNextConfigId() { ConfigId id; lock (_sharedStatics) { if (m_currentConfigId == 0) { m_currentConfigId = ConfigId.Reserved; } id = m_currentConfigId++; } return(id); }
public override int Compare(ObjectId x, ObjectId y) { int c = Type.CompareTo(x.Type); if (c != 0) { return(c); } c = ConfigId.CompareTo(x.ConfigId); if (c != 0) { return(c); } return(InstanceId.CompareTo(x.InstanceId)); }
public override int GetHashCode() { int hash = 1; if (ConfigId.Length != 0) { hash ^= ConfigId.GetHashCode(); } if (tapConfig_ != null) { hash ^= TapConfig.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public ActionResult Logout() { ConfigId.ClearStoreItem(); //var cookieConfig = Request.Cookies["id_config"]; //if (cookieConfig != null) cookieConfig.Expires = DateTime.Now; var cookieJob = Request.Cookies["id_job"]; if (cookieJob != null) { cookieJob.Expires = DateTime.Now; } authenticationService.LogOff(); SessionContainer.Remove(); //var cookieFranchise = Request.Cookies["franchise_id"]; //if (cookieFranchise != null) cookieFranchise.Expires = DateTime.Now.AddDays(7); return(Json(new { result = "success" })); }
static public PolicyLevel LoadPolicyLevelFromFile(String path, PolicyLevelType type) { if (path == null) { throw new ArgumentNullException("path"); } ConfigId id = SharedStatics.GetNextConfigId(); ConfigRetval retval = Config.InitData(id, path); if ((retval & ConfigRetval.ConfigFile) == 0) { throw new ArgumentException(Environment.GetResourceString("Argument_PolicyFileDoesNotExist")); } String name = Enum.GetName(typeof(PolicyLevelType), type); if (name == null) { return(null); } String fullPath = Path.GetFullPath(path); FileIOPermission perm = new FileIOPermission(PermissionState.None); perm.AddPathList(FileIOPermissionAccess.Read, fullPath); perm.AddPathList(FileIOPermissionAccess.Write, fullPath); perm.Demand(); PolicyLevel level = new PolicyLevel(name, id, type == PolicyLevelType.Machine); level.ThrowOnLoadError = true; level.CheckLoaded(false); return(level); }
private static extern bool _SaveDataByte( ConfigId id, byte[] data, int offset, int length );
internal static bool SaveData( ConfigId id, byte[] data, int offset, int length ) { return _SaveDataByte( id, data, offset, length ); }
internal static bool SaveData( ConfigId id, String data ) { return _SaveDataString( id, data ); }
internal static extern void SaveCacheData( ConfigId id );
internal static ConfigRetval InitData( ConfigId id, String configFile, String cacheFile ) { return _InitDataEx( id, configFile, cacheFile ); }
internal PolicyLevel( String label, ConfigId id, bool useDefaultCodeGroupOnReset, bool generateQuickCacheOnLoad ) { m_configId = id; m_label = label; m_rootCodeGroup = null; m_loaded = false; m_caching = (id != ConfigId.None); m_useDefaultCodeGroupsOnReset = useDefaultCodeGroupOnReset; m_generateQuickCacheOnLoad = generateQuickCacheOnLoad; }
internal static String GetStoreLocation( ConfigId configId ) { if (configId == ConfigId.None) { return null; } return _GetStoreLocation( configId ); }
internal static extern byte[] GetData(ConfigId id);
private static extern bool _SaveDataByte(ConfigId id, byte[] data, int offset, int length);
private static extern bool _SaveDataString(ConfigId id, String data);
internal static bool SaveData(ConfigId id, byte[] data, int offset, int length) { return(_SaveDataByte(id, data, offset, length)); }
public static ConfigId GetNextConfigId() { ConfigId id; lock (_sharedStatics) { if (m_currentConfigId == 0) m_currentConfigId = ConfigId.Reserved; id = m_currentConfigId++; } return id; }
internal PolicyLevel( PolicyLevel level ) { m_configId = level.m_configId; m_label = level.m_label; m_rootCodeGroup = level.RootCodeGroup; m_loaded = true; m_caching = level.m_caching; m_useDefaultCodeGroupsOnReset = level.m_useDefaultCodeGroupsOnReset; m_namedPermissionSets = (ArrayList)level.NamedPermissionSets; m_fullTrustAssemblies = (ArrayList)level.FullTrustAssemblies; m_encoding = level.m_encoding; m_generateQuickCacheOnLoad = false; }
internal static extern QuickCacheEntryType GetQuickCacheEntry( ConfigId id );
internal static extern bool GetCacheEntry( ConfigId id, int numKey, char[] key, out char[] data );
internal static extern QuickCacheEntryType GetQuickCacheEntry(ConfigId id);
internal PolicyLevel (PolicyLevelType type, string path, ConfigId configId) { m_type = type; m_path = path; m_loaded = (path == null); if (m_path == null) { m_rootCodeGroup = CreateDefaultAllGroup(); SetFactoryPermissionSets(); SetDefaultFullTrustAssemblies(); } m_configId = configId; }
internal static extern void SetQuickCache(ConfigId id, QuickCacheEntryType cache);
internal static extern void SetQuickCache(ConfigId id, QuickCacheEntryType quickCacheFlags);
internal static extern bool GetCacheEntry(ConfigId id, int numKey, char[] key, out char[] data);
private static extern ConfigRetval _InitDataEx( ConfigId id, String configFile, String cacheFile );
internal static extern void AddCacheEntry(ConfigId id, int numKey, char[] key, char[] data);
internal static extern void ClearCacheData( ConfigId id );
[System.Security.SecurityCritical] // auto-generated internal static void AddCacheEntry(ConfigId id, int numKey, byte[] key, byte[] data) { AddCacheEntry(id, numKey, key, key.Length, data, data.Length); }
internal static bool SaveData( ConfigId id, byte[] data ) { return _SaveDataByte( id, data, 0, data.Length ); }
internal static extern bool RecoverData(ConfigId id);
private static extern bool _SaveDataString( ConfigId id, String data );
private static extern bool GetCacheEntry(ConfigId id, int numKey, [In] byte[] key, int keyLength, ObjectHandleOnStack retData);
internal static extern byte[] GetData( ConfigId id );
internal PolicyLevel( String label ) { m_configId = ConfigId.None; SetFactoryPermissionSets(); SetDefaultFullTrustAssemblies(); m_loaded = true; m_rootCodeGroup = CreateDefaultAllGroup(); m_label = label; m_caching = false; m_useDefaultCodeGroupsOnReset = false; m_generateQuickCacheOnLoad = false; }
internal static extern void SetQuickCache( ConfigId id, QuickCacheEntryType cache );
internal static extern void AddCacheEntry( ConfigId id, int numKey, char[] key, char[] data );
private static extern String _GetStoreLocation( ConfigId configId );
internal static extern void ResetCacheData(ConfigId id);
private static extern void AddCacheEntry(ConfigId id, int numKey, [In] byte[] key, int keyLength, byte[] data, int dataLength);
internal PolicyLevel( String label, ConfigId id, bool useDefaultCodeGroupOnReset ) : this( label, id, useDefaultCodeGroupOnReset, false ) { }
private static extern String _GetStoreLocation(ConfigId configId);
internal static void AddCacheEntry(ConfigId id, int numKey, byte[] key, byte[] data) { AddCacheEntry(id, numKey, key, key.Length, data, data.Length); }
[System.Security.SecurityCritical] // auto-generated internal static bool GetCacheEntry(ConfigId id, int numKey, byte[] key, out byte[] data) { byte[] retData = null; bool ret = GetCacheEntry(id, numKey, key, key.Length, JitHelpers.GetObjectHandleOnStack(ref retData)); data = retData; return ret; }