internal static void InvalidateInstancesTypes() { Types.Clear(); Instances.Clear(); TypesByProxy.Clear(); TypesByOriginal.Clear(); }
internal static EncryptedType GetTrackedTypeByEncrypted(Type type) { EncryptedType returnVal; TypesByProxy.TryGetValue(type.FullName, out returnVal); return(returnVal); }
internal static EncryptedType GetTrackedType(Type type, EncryptionProxyConfiguration configuration = null) { var encryptedType = GetTrackedTypeByEncrypted(type); if (encryptedType != null) { return(encryptedType); } var existingType = GetTrackedTypeOrNull(type); if (existingType == null) { if (configuration == null) { configuration = new EncryptionProxyConfiguration(); } existingType = new EncryptedType(type, configuration); Types.Add(existingType); TypesByProxy.Add(existingType.ProxyType.FullName, existingType); TypesByOriginal.Add(type.FullName, existingType); } return(existingType); }