import { InversifyContainerFacade } from '../../InversifyContainerFacade'; import { ContainerModule, interfaces } from 'inversify'; import { ServiceIdentifiers } from '../../ServiceIdentifiers'; import { ICustomCodeHelper } from '../../../interfaces/custom-code-helpers/ICustomCodeHelper'; import { ICustomCodeHelperFormatter } from '../../../interfaces/custom-code-helpers/ICustomCodeHelperFormatter'; import { ICustomCodeHelperGroup } from '../../../interfaces/custom-code-helpers/ICustomCodeHelperGroup'; import { ICustomCodeHelperObfuscator } from '../../../interfaces/custom-code-helpers/ICustomCodeHelperObfuscator'; import { CustomCodeHelper } from '../../../enums/custom-code-helpers/CustomCodeHelper'; import { CustomCodeHelperGroup } from '../../../enums/custom-code-helpers/CustomCodeHelperGroup'; import { ConsoleOutputCodeHelperGroup } from '../../../custom-code-helpers/console-output/group/ConsoleOutputCodeHelperGroup'; import { DebugProtectionCodeHelperGroup } from '../../../custom-code-helpers/debug-protection/group/DebugProtectionCodeHelperGroup'; import { DomainLockCustomCodeHelperGroup } from '../../../custom-code-helpers/domain-lock/group/DomainLockCustomCodeHelperGroup'; import { SelfDefendingCodeHelperGroup } from '../../../custom-code-helpers/self-defending/group/SelfDefendingCodeHelperGroup'; import { StringArrayCodeHelperGroup } from '../../../custom-code-helpers/string-array/group/StringArrayCodeHelperGroup'; import { ConsoleOutputDisableCodeHelper } from '../../../custom-code-helpers/console-output/ConsoleOutputDisableCodeHelper'; import { CustomCodeHelperFormatter } from '../../../custom-code-helpers/CustomCodeHelperFormatter'; import { CustomCodeHelperObfuscator } from '../../../custom-code-helpers/CustomCodeHelperObfuscator'; import { DebugProtectionFunctionCallCodeHelper } from '../../../custom-code-helpers/debug-protection/DebugProtectionFunctionCallCodeHelper'; import { DebugProtectionFunctionIntervalCodeHelper } from '../../../custom-code-helpers/debug-protection/DebugProtectionFunctionIntervalCodeHelper'; import { DebugProtectionFunctionCodeHelper } from '../../../custom-code-helpers/debug-protection/DebugProtectionFunctionCodeHelper'; import { DomainLockCodeHelper } from '../../../custom-code-helpers/domain-lock/DomainLockCodeHelper'; import { CallsControllerFunctionCodeHelper } from '../../../custom-code-helpers/calls-controller/CallsControllerFunctionCodeHelper'; import { SelfDefendingUnicodeCodeHelper } from '../../../custom-code-helpers/self-defending/SelfDefendingUnicodeCodeHelper'; import { StringArrayCallsWrapperCodeHelper } from '../../../custom-code-helpers/string-array/StringArrayCallsWrapperCodeHelper'; import { StringArrayCodeHelper } from '../../../custom-code-helpers/string-array/StringArrayCodeHelper'; import { StringArrayRotateFunctionCodeHelper } from '../../../custom-code-helpers/string-array/StringArrayRotateFunctionCodeHelper'; export const customCodeHelpersModule: interfaces.ContainerModule = new ContainerModule((bind: interfaces.Bind) => { // custom code helpers bind(ServiceIdentifiers.ICustomCodeHelper) .to(ConsoleOutputDisableCodeHelper) .whenTargetNamed(CustomCodeHelper.ConsoleOutputDisable); bind(ServiceIdentifiers.ICustomCodeHelper) .to(DebugProtectionFunctionCallCodeHelper) .whenTargetNamed(CustomCodeHelper.DebugProtectionFunctionCall); bind(ServiceIdentifiers.ICustomCodeHelper) .to(DebugProtectionFunctionIntervalCodeHelper) .whenTargetNamed(CustomCodeHelper.DebugProtectionFunctionInterval); bind(ServiceIdentifiers.ICustomCodeHelper) .to(DebugProtectionFunctionCodeHelper) .whenTargetNamed(CustomCodeHelper.DebugProtectionFunction); bind(ServiceIdentifiers.ICustomCodeHelper) .to(DomainLockCodeHelper) .whenTargetNamed(CustomCodeHelper.DomainLock); bind(ServiceIdentifiers.ICustomCodeHelper) .to(CallsControllerFunctionCodeHelper) .whenTargetNamed(CustomCodeHelper.CallsControllerFunction); bind(ServiceIdentifiers.ICustomCodeHelper) .to(SelfDefendingUnicodeCodeHelper) .whenTargetNamed(CustomCodeHelper.SelfDefendingUnicode); bind(ServiceIdentifiers.ICustomCodeHelper) .to(StringArrayCallsWrapperCodeHelper) .whenTargetNamed(CustomCodeHelper.StringArrayCallsWrapper); bind(ServiceIdentifiers.ICustomCodeHelper) .to(StringArrayCodeHelper) .whenTargetNamed(CustomCodeHelper.StringArray); bind(ServiceIdentifiers.ICustomCodeHelper) .to(StringArrayRotateFunctionCodeHelper) .whenTargetNamed(CustomCodeHelper.StringArrayRotateFunction); // code helper groups bind(ServiceIdentifiers.ICustomCodeHelperGroup) .to(ConsoleOutputCodeHelperGroup) .whenTargetNamed(CustomCodeHelperGroup.ConsoleOutput); bind(ServiceIdentifiers.ICustomCodeHelperGroup) .to(DebugProtectionCodeHelperGroup) .whenTargetNamed(CustomCodeHelperGroup.DebugProtection); bind(ServiceIdentifiers.ICustomCodeHelperGroup) .to(DomainLockCustomCodeHelperGroup) .whenTargetNamed(CustomCodeHelperGroup.DomainLock); bind(ServiceIdentifiers.ICustomCodeHelperGroup) .to(SelfDefendingCodeHelperGroup) .whenTargetNamed(CustomCodeHelperGroup.SelfDefending); bind(ServiceIdentifiers.ICustomCodeHelperGroup) .to(StringArrayCodeHelperGroup) .whenTargetNamed(CustomCodeHelperGroup.StringArray); // customCodeHelper factory bind(ServiceIdentifiers.Factory__ICustomCodeHelper) .toFactory(InversifyContainerFacade .getFactory(ServiceIdentifiers.ICustomCodeHelper)); // customCodeHelperGroup factory bind(ServiceIdentifiers.Factory__ICustomCodeHelperGroup) .toFactory(InversifyContainerFacade .getFactory(ServiceIdentifiers.ICustomCodeHelperGroup)); // custom code helper formatter bind(ServiceIdentifiers.ICustomCodeHelperFormatter) .to(CustomCodeHelperFormatter) .inSingletonScope(); // custom code helper obfuscator bind(ServiceIdentifiers.ICustomCodeHelperObfuscator) .to(CustomCodeHelperObfuscator) .inSingletonScope(); });