Example #1
0
 public void LogEtlVariable(EtlVariable variable)
 {
     foreach (var logger in _loggers)
     {
         logger.LogEtlVariable(variable);
     }
 }
Example #2
0
        public void LogEtlVariable(EtlVariable variable)
        {
            if (variable == null)
            {
                throw new ArgumentNullException("variable");
            }

            _variables.Add(variable);
        }
            public EtlVariable[] GetVariables()
            {
                var variables = new EtlVariable[_variables.Count];
                for (var i = 0; i < variables.Length; i++)
                {
                    variables[i] = (EtlVariable)_variables[i].Clone();
                }

                return variables;
            }
 protected EtlVariable(EtlVariable obj)
 {
     this.EtlPackageId = obj.EtlPackageId;
     this.EtlSessionId = obj.EtlSessionId;
     this.Name = obj.Name;
     this.Modifier = obj.Modifier;
     this.Value = obj.Value;
     this.IsSecure = obj.IsSecure;
     this.DateTime = obj.DateTime;
     this.UtcDateTime = obj.UtcDateTime;
 }
Example #5
0
 protected EtlVariable(EtlVariable obj)
 {
     this.EtlPackageId = obj.EtlPackageId;
     this.EtlSessionId = obj.EtlSessionId;
     this.Name         = obj.Name;
     this.Modifier     = obj.Modifier;
     this.Value        = obj.Value;
     this.IsSecure     = obj.IsSecure;
     this.DateTime     = obj.DateTime;
     this.UtcDateTime  = obj.UtcDateTime;
 }
 public void LogEtlVariable(EtlVariable variable)
 {
 }
Example #7
0
 public void LogEtlVariable(EtlVariable variable)
 {
 }
            private EtlVariable EscapeVariable(EtlVariable variable)
            {
                if (variable == null)
                {
                    return null;
                }

                var escapedVariable = (EtlVariable)variable.Clone();
                if (variable.IsSecure)
                {
                    escapedVariable.Value = SECURE_VARIABLE_ESCAPED_VALUE;
                }

                return escapedVariable;
            }
 public void LogEtlVariable(EtlVariable variable)
 {
     foreach (var logger in _loggers)
     {
         logger.LogEtlVariable(variable);
     }
 }
            public void InitVariables(IEnumerable<EtlVariableInfo> variablesInfo, IEnumerable<EtlVariableAssignment> assignments)
            {
                _variables.Clear();

                foreach (var variableInfo in variablesInfo)
                {
                    var variable = new EtlVariable
                    {
                        EtlPackageId = this.EtlPackageId,
                        EtlSessionId = this.EtlSessionId,
                        Name = variableInfo.Name,
                        Modifier = variableInfo.Modifier,
                        IsSecure = variableInfo.IsSecure,
                        DateTime = DateTime.Now,
                        UtcDateTime = DateTime.Now.ToUniversalTime(),
                    };

                    switch (variableInfo.Modifier)
                    {
                        case EtlVariableModifier.Bound:
                            variable.Value = EvaluateBoundVariable(variableInfo);
                            break;
                        case EtlVariableModifier.Input:
                            variable.Value = variableInfo.DefaultValue;
                            break;
                        case EtlVariableModifier.Output:
                            variable.Value = variableInfo.DefaultValue;
                            break;
                        default:
                            throw new InvalidOperationException(string.Format(Properties.Resources.UnknownVariableModifier, variableInfo.Name, variableInfo.Modifier));
                    }

                    _variables.Add(variable);
                }

                foreach (var assignment in assignments)
                {
                    AssignVariable(assignment, true);
                }
            }
        public void LogEtlVariable(EtlVariable variable)
        {
            if (variable == null)
            {
                throw new ArgumentNullException("variable");
            }

            _variables.Add(variable);
        }