コード例 #1
0
            /// <summary>
            /// Executes this instance.
            /// </summary>
            public override void Execute(TargetCallStack callStack)
            {
                if (!Test)
                {
                    return;
                }

                base.Execute(callStack);
            }
コード例 #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;
                            }
                        }
                    }
                }
            }
コード例 #3
0
 public DnsFunctions(Project project, PropertyAccessor properties, TargetCallStack cs) : base(project, properties, cs)
 {
 }
コード例 #4
0
 /// <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)
 {
 }
コード例 #5
0
 public VersionConversionFunctions(Project project, PropertyAccessor properties, TargetCallStack callStack) : base(project, properties, callStack)
 {
 }
コード例 #6
0
 /// <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)
 {
 }
コード例 #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)
 {
 }
コード例 #8
0
 public CoercionFunctions(Project project, PropertyAccessor propDict, TargetCallStack tcs) :
     base(project, propDict, tcs)
 {
 }
コード例 #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)
 {
 }
コード例 #10
0
 /// <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)
 {
 }
コード例 #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)
 {
 }
コード例 #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)
 {
 }