public static OpportunityWrapper Load(Opportunity Opportunity) { if (Opportunity == null) { throw new ArgumentException("Opportunity cannot be null"); } return(new OpportunityWrapper(Opportunity)); }
public static Task Create(string description, Opportunity opp) { if (string.IsNullOrEmpty(description)) { throw new ArgumentException("Description cannot be null or empty"); } return(new Task(description, opp)); }
public void SetOpportunity(Opportunity o) { if (this.Kase != null || this.Party != null) { throw new ArgumentException("Only one of kase, opportunity and party can be populated"); } this.Opportunity = o; }
private OpportunityWrapper(Opportunity Opportunity) { this.Opportunity = Opportunity; this.Opportunities = null; }
private Task(string description, Opportunity opp) { this.Description = description; this.Opportunity = opp; }