/// <summary>
            /// Executes this instance.
            /// </summary>
            public override void Execute(TargetCallStack callStack)
            {
                if (!Test)
                {
                    return;
                }

                base.Execute(callStack);
            }
Exemple #2
0
            public void Catch(BuildException be, TargetCallStack callStack, PropertyAccessor accessor)
            {
                bool   propertyExists        = false;
                string originalPropertyValue = null;

                if (Property != null)
                {
                    propertyExists = accessor.Contains(Property);

                    if (accessor.Contains(Property))
                    {
                        originalPropertyValue = accessor[Property];
                    }

                    accessor[Property] = GetExceptionMessage(be);
                }

                try {
                    Execute(callStack);
                } finally {
                    if (Property != null)
                    {
                        if (!propertyExists)
                        {
                            // if the property did not exist, then remove it again
                            accessor.Remove(Property);
                        }
                        else
                        {
                            // restore original value
                            if (!String.IsNullOrWhiteSpace(originalPropertyValue))
                            {
                                accessor[Property] = originalPropertyValue;
                            }
                        }
                    }
                }
            }
 public DnsFunctions(Project project, PropertyAccessor properties, TargetCallStack cs) : base(project, properties, cs)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TimeSpanFunctions"/> class.
 /// </summary>
 /// <param name="project">The current project.</param>
 /// <param name="properties">The projects properties.</param>
 public TimeSpanFunctions(Project project, PropertyAccessor properties, TargetCallStack callStack) : base(project, properties, callStack)
 {
 }
Exemple #5
0
 public VersionConversionFunctions(Project project, PropertyAccessor properties, TargetCallStack callStack) : base(project, properties, callStack)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="OperatingSystemFunctions"/> class.
 /// </summary>
 /// <param name="project">The current project.</param>
 /// <param name="properties">The projects properties.</param>
 public OperatingSystemFunctions(Project project, PropertyAccessor properties, TargetCallStack callStack) : base(project, properties, callStack)
 {
 }
Exemple #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AssemblyFunctions"/> class.
 /// </summary>
 /// <param name="project">The current project.</param>
 /// <param name="properties">The projects properties.</param>
 public AssemblyFunctions(Project project, PropertyAccessor properties, TargetCallStack callStack) : base(project, properties, callStack)
 {
 }
Exemple #8
0
 public CoercionFunctions(Project project, PropertyAccessor propDict, TargetCallStack tcs) :
     base(project, propDict, tcs)
 {
 }
Exemple #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FileVersionInfoFunctions"/> class.
 /// </summary>
 /// <param name="project">The current project.</param>
 /// <param name="properties">The projects properties.</param>
 public FileVersionInfoFunctions(Project project, PropertyAccessor properties, TargetCallStack callStack) : base(project, properties, callStack)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PkgConfigFunctions"/> class.
 /// </summary>
 /// <param name="project">The current project.</param>
 /// <param name="properties">The projects properties.</param>
 public PkgConfigFunctions(Project project, PropertyAccessor properties, TargetCallStack callStack) : base(project, properties, callStack)
 {
 }
Exemple #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EnvironmentFunctions"/> class.
 /// </summary>
 /// <param name="project">The current project.</param>
 /// <param name="properties">The projects properties.</param>
 public EnvironmentFunctions(Project project, PropertyAccessor properties, TargetCallStack callStack) : base(project, properties, callStack)
 {
 }
Exemple #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FrameworkFunctions"/> class.
 /// </summary>
 /// <param name="project">The parent project.</param>
 /// <param name="properties">The projects properties.</param>
 public FrameworkFunctions(Project project, PropertyAccessor properties, TargetCallStack callStack) : base(project, properties, callStack)
 {
 }