/// <summary> /// Initializes a new instance of the <see cref="CSharpCreateInstruction"/> class. /// </summary> /// <param name="context">The creation context.</param> /// <param name="parentFeature">The parent feature.</param> /// <param name="source">The Easly instruction from which the C# instruction is created.</param> protected CSharpCreateInstruction(ICSharpContext context, ICSharpFeature parentFeature, ICreateInstruction source) : base(context, parentFeature, source) { EntityType = CSharpType.Create(context, source.ResolvedEntityType.Item); CreatedObjectName = ((IIdentifier)source.EntityIdentifier).ValidText.Item; CreationRoutineName = ((IIdentifier)source.CreationRoutineIdentifier).ValidText.Item; FeatureCall = new CSharpFeatureCall(context, source.FeatureCall.Item); }
/// <summary> /// Creates a new C# instruction. /// </summary> /// <param name="context">The creation context.</param> /// <param name="parentFeature">The parent feature.</param> /// <param name="source">The Easly instruction from which the C# instruction is created.</param> public static ICSharpCreateInstruction Create(ICSharpContext context, ICSharpFeature parentFeature, ICreateInstruction source) { return(new CSharpCreateInstruction(context, parentFeature, source)); }