google-apis icon indicating copy to clipboard operation
google-apis copied to clipboard

the call is ambiguous between the following methods

Open senzacionale opened this issue 10 years ago • 0 comments

untitled

my solution if is ok:

var attributes = property.GetCustomAttributes<Google.Apis.Util.RequestParameterAttribute>();            
                if (attributes != null && attributes.Count() > 0)
                {
                    var attribute = attributes.ElementAt (0);
                    string name = attribute.Name ?? property.Name.ToLower();
                    object valueObject = property.GetValue(this, new object[] {} );
                    string value = String.Empty;
                    if (valueObject != null)
                    {
                        value = valueObject.ToString();
                    }

                    requestBuilder.AddParameter(attribute.Type, name, value);
                }

senzacionale avatar May 08 '14 14:05 senzacionale