private void Initialize() { extensionEnum = new ExtensionEnum(); if (isFirstLoad == false) { return; } managers = GetComponentsInChildren <ManagerBase>(); SetActiveExtensions(); for (int i = 0; i < managers.Length; i++) { if (!managers[i].GetIsExtensionLoaded()) { continue; } managers[i].OnTraitsFound += PassDelegatesToTraits; for (int j = 0; j < managers.Length; j++) { managers[i].OnTraitsFound += managers[j].PassDelegatesToTraits; } managers[i].Initialize(); managers[i].SetTraits(); managers[i].LateInitialize(); managers[i].SetStartAction(SetActiveManager); managers[i].SetEndAction(RemoveFromActiveManager); managers[i].SetIsStartableFunction(GetIsManagerStartable); managers[i].LoadAtGameStart(); } isFirstLoad = false; }
public InstructionData(ExtensionEnum sentExtension = ExtensionEnum.None, string sentName = null, int[] sentIdentifer = null, TransformValue sentTransformValue = default(TransformValue)) { extension = sentExtension; name = sentName; identifier = sentIdentifer; transformValue = sentTransformValue; }
/// <summary> /// Initializes a new instance of the <see cref="InputStringToFile" /> class. /// </summary> /// <param name="input">Text string (body of file) (required).</param> /// <param name="extension">File extension (required) (default to ExtensionEnum.TXT).</param> /// <param name="filename">Name of file (without extension) (required).</param> public InputStringToFile(string input = default(string), ExtensionEnum extension = ExtensionEnum.TXT, string filename = default(string)) { // to ensure "input" is required (not null) if (input == null) { throw new InvalidDataException("input is a required property for InputStringToFile and cannot be null"); } else { this.Input = input; } // to ensure "extension" is required (not null) if (extension == null) { throw new InvalidDataException("extension is a required property for InputStringToFile and cannot be null"); } else { this.Extension = extension; } // to ensure "filename" is required (not null) if (filename == null) { throw new InvalidDataException("filename is a required property for InputStringToFile and cannot be null"); } else { this.Filename = filename; } }
/// <summary> /// Initializes a new instance of the <see cref="InputStringToFile" /> class. /// </summary> /// <param name="input">Text string (body of file) (required).</param> /// <param name="extension">File extension (required) (default to ExtensionEnum.TXT).</param> /// <param name="filename">Name of file (without extension) (required).</param> public InputStringToFile(string input = default(string), ExtensionEnum extension = ExtensionEnum.TXT, string filename = default(string)) { // to ensure "input" is required (not null) this.Input = input ?? throw new ArgumentNullException("input is a required property for InputStringToFile and cannot be null"); this.Extension = extension; // to ensure "filename" is required (not null) this.Filename = filename ?? throw new ArgumentNullException("filename is a required property for InputStringToFile and cannot be null"); }
private bool GetIsExtensionActive(ExtensionEnum sentExtension) { if (sentExtension == ExtensionEnum.None) { return(true); } for (int i = 0; i < managers.Length; i++) { if (managers[i].Extension == sentExtension) { if (managers[i].ThisGO.activeSelf == false) { return(false); } return(true); } } return(false); }
public ModelToDTOProfile() { CreateMap <Usuario, UsuarioDTO>(); CreateMap <Categoria, CategoriaDTO>(); CreateMap <Conta, ContaDTO>(); CreateMap <FormaPagamento, FormaPagamentoDTO>(); CreateMap <ItemMovimentacao, ItemMovimentacaoDTO>() .AfterMap((scr, dest) => dest.Tipo = scr.Tipo.ToString()) .AfterMap((scr, dest) => dest.TipoDescricao = ExtensionEnum.ObterDescricao((TipoItemMovimentacao)Enum.Parse(typeof(TipoItemMovimentacao), dest.Tipo.ToString()))); CreateMap <MovimentacaoPrevista, MovimentacaoPrevistaDTO>() .AfterMap((scr, dest) => dest.Status = scr.Status.ToString()) .AfterMap((scr, dest) => dest.StatusDescricao = ExtensionEnum.ObterDescricao((StatusMovimentacaoPrevista)Enum.Parse(typeof(StatusMovimentacaoPrevista), dest.Status.ToString()))) .AfterMap((scr, dest) => dest.TipoPrioridade = scr.Movimentacao.TipoPrioridade.ToString()) .AfterMap((scr, dest) => dest.TipoPrioridadeDescricao = ExtensionEnum.ObterDescricao((TipoPrioridade)Enum.Parse(typeof(TipoPrioridade), scr.Movimentacao.TipoPrioridade.ToString()))) .AfterMap((scr, dest) => dest.Observacao = scr.Movimentacao.Observacao) .AfterMap((scr, dest) => dest.Parcela = scr.NrParcelaTotal > 1 ? $"({scr.NrParcela}/{scr.NrParcelaTotal})": ""); }
public IList GetAllTipo() { return(ExtensionEnum.Listar(typeof(TipoItemMovimentacao))); }
public IList GetAllStatus() { return(ExtensionEnum.Listar(typeof(StatusMovimentacaoPrevista))); }