/// <summary> /// Convert this instance setter to a method entity. /// </summary> /// <returns>A method entity.</returns> public MethodEntity SetterAsMethodEntity() { MethodEntity methodEntity = this.Setter; if (methodEntity != null) { methodEntity.MinAvailability = this.MinAvailability; methodEntity.MaxAvailability = this.MaxAvailability; methodEntity.Name = "Set" + this.Name; methodEntity.ReturnType = "void"; MethodParameterEntity methodParameterEntity = new MethodParameterEntity(); methodParameterEntity.Type = this.Type; methodParameterEntity.Name = "value"; methodEntity.Parameters.Add(methodParameterEntity); methodEntity.Static = this.Static; methodEntity.Summary = this.Summary; } return(methodEntity); }
/// <summary> /// Initializes a new instance of the <see cref = "MethodEntity" /> class. /// </summary> /// <param name = "methodEntity">The method entity.</param> public MethodEntity(MethodEntity methodEntity) : this() { this.MinAvailability = methodEntity.MinAvailability; this.Generate = methodEntity.Generate; this.Name = methodEntity.Name; this.ReturnsDocumentation = methodEntity.ReturnsDocumentation; this.ReturnType = methodEntity.ReturnType; this.Selector = methodEntity.Selector; this.Signature = methodEntity.Signature; this.Static = methodEntity.Static; this.Summary = new List <string> (methodEntity.Summary); foreach (MethodParameterEntity methodParameterEntity in methodEntity.Parameters) { MethodParameterEntity parameter = new MethodParameterEntity(methodParameterEntity); this.Parameters.Add(parameter); } this.GenerateConstructor = methodEntity.GenerateConstructor; }
/// <summary> /// Initializes a new instance of the <see cref="Monobjc.Tools.Generator.Model.Entities.FunctionEntity"/> class. /// </summary> public FunctionEntity(FunctionEntity functionEntity) : this() { this.MinAvailability = functionEntity.MinAvailability; this.Generate = functionEntity.Generate; this.Name = functionEntity.Name; this.ReturnsDocumentation = functionEntity.ReturnsDocumentation; this.ReturnType = functionEntity.ReturnType; this.Selector = functionEntity.Selector; this.Signature = functionEntity.Signature; this.Static = functionEntity.Static; this.Summary = new List <String> (functionEntity.Summary); foreach (MethodParameterEntity methodParameterEntity in functionEntity.Parameters) { MethodParameterEntity parameter = new MethodParameterEntity(methodParameterEntity); this.Parameters.Add(parameter); } this.GenerateConstructor = functionEntity.GenerateConstructor; this.SharedLibrary = functionEntity.SharedLibrary; this.EntryPoint = functionEntity.EntryPoint; }