public override IOperation Clone(bool addSuffix) { Dynamics365RelationshipOperation clone = (Dynamics365RelationshipOperation)base.Clone(addSuffix); clone.AssociatedTarget = AssociatedTarget?.Clone(); return(clone); }
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { if (!string.IsNullOrEmpty((string)value)) { string relationshipSchemaName = (string)value; Dynamics365RelationshipOperation operation = (Dynamics365RelationshipOperation)context.Instance; List <Dynamics365Relationship> relationships = Dynamics365Relationship.GetRelationships(operation.Entity, operation.Connection); Dynamics365Relationship relationship = Dynamics365Relationship.GetRelationships(operation.Entity, operation.Connection).FirstOrDefault(r => r.SchemaName == relationshipSchemaName); return(relationship); } return(null); }