ProjectData Class

Summary

A generic class used to store project data
Assembly
Cake.igloo15.Helper.dll
Namespace
Cake.igloo15.Helper
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["ProjectData"] class Type type-node

Syntax

public class ProjectData

Attributes

Type Description
DefaultMemberAttribute

Constructors

Name Summary
ProjectData(ICakeContext, Dictionary<string, ArgumentValue>) The Project Data Constructor

Properties

Name Value Summary
Context ICakeContext
The General Cake Context
CurrentTask ICakeTaskInfo
The current task
ProjectVersion GitVersion
The Git Version
this[string] object
Indexer for the project data it will search in order the following data: Public, Private, Arguments

Methods

Name Value Summary
ContainsKey(string) bool
Checks if key is in project data
Get(string) object
Gets the object representation of data stored in ProjectData
Get<T>(string) T
Returns a value of the specified type
GetArg<T>(string) T
Gets an argument defined via the constructor
GetArgValue(string) ArgumentValue
Returns the ArgumentValue
GetStr(string) string
Short hand for getting a string
GetString(string) string
Returns a string value of the given key
Set(string, object, ProjectDataType, bool) ProjectData
This will set the data for the first time as either Public or Private depending on passed type (Public is default). If data already exists at the key it will attempt to update the data and ignore the passed project data type. If you intend to override an argument the 4th param can be used to ensure overriden
SetPrivate(string, object) ProjectData
Set a private property with given key and value. This value will not show up when printing the values of this object via ToString()
ToString() string
Print the values of all data in project data except private data
Update(string, object, bool) bool
Will update a specific piece of data it returns false if data doesn't already exist. if you want to override your passed in arguments you must set last param to true

Extension Methods

Name Value Summary
Dump<ProjectData>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<ProjectData>(ProjectData[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<ProjectData>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<ProjectData>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<ProjectData>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<ProjectData>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin