public String GetNameForResponseField( SdkMessageResponse response, SdkMessageResponseField responseField, IServiceProvider services) { return(DefaultNamingService.GetNameForResponseField( response, responseField, services)); }
public MetadataResponseField(SdkMessageResponseField field) { Index = field.Index; Name = field.Name; CLRFormatter = field.CLRFormatter; Value = field.Value; }
/// <inheritdoc /> public string GetNameForResponseField(SdkMessageResponse response, SdkMessageResponseField responseField, IServiceProvider services) { string value = _defaultService.GetNameForResponseField(response, responseField, services); value = ModifyPublisher(value); return(value); }
public string GetNameForResponseField(SdkMessageResponse response, SdkMessageResponseField responseField, IServiceProvider services) { var defaultName = DefaultService.GetNameForResponseField(response, responseField, services); return(CamelCaseMemberNames ? CamelCaser.Case(defaultName) : defaultName); }
async Task <string> INamingService.GetNameForResponseFieldAsync(SdkMessageResponse response, SdkMessageResponseField responseField, IServiceProvider services) { await CrmSvcUtil.CrmSvcUtilLogger.TraceMethodStartAsync("Entering {0}", MethodBase.GetCurrentMethod().Name); if (this._knowNames.ContainsKey(response.Id.ToString() + responseField.Index.ToString(CultureInfo.InvariantCulture))) { await CrmSvcUtil.CrmSvcUtilLogger.TraceMethodStopAsync("Exiting {0}", MethodBase.GetCurrentMethod().Name); return(this._knowNames[response.Id.ToString() + responseField.Index.ToString(CultureInfo.InvariantCulture)]); } var text = NamingService.CreateValidName(responseField.Name); this._knowNames.Add(response.Id.ToString() + responseField.Index.ToString(CultureInfo.InvariantCulture), text); await CrmSvcUtil.CrmSvcUtilLogger.TraceMethodStopAsync("Exiting {0}", MethodBase.GetCurrentMethod().Name); return(text); }
public override string GetNameForResponseField(SdkMessageResponse response, SdkMessageResponseField responseField, IServiceProvider services) { string returnValue = string.Empty; string defaultValue = base.GetNameForResponseField(response, responseField, services); foreach (var namer in _namers) { Trace.Debug($"Executing naming rule {nameof(GetNameForResponseField)} using {namer.GetType().FullName}"); returnValue = namer.GetNameForResponseField(response, responseField, services); if (returnValue != defaultValue) { break; } } return(string.IsNullOrEmpty(returnValue) ? defaultValue : returnValue); }
public CodeGenerationType GetTypeForResponseField(SdkMessageResponse response, SdkMessageResponseField responseField, IServiceProvider services) { return(DefaultService.GetTypeForResponseField(response, responseField, services)); }
protected virtual CodeGenerationType GetTypeForResponseFieldInternal(SdkMessageResponse response, SdkMessageResponseField responseField, IServiceProvider services) { return(DefaultService.GetTypeForResponseField(response, responseField, services)); }
/// <inheritdoc /> public string GetNameForResponseField(SdkMessageResponse response, SdkMessageResponseField responseField, IServiceProvider services) { return(NamingServiceImplementation.GetNameForResponseField(response, responseField, services)); }
async Task <CodeTypeReference> ITypeMappingService.GetTypeForResponseFieldAsync(SdkMessageResponseField responseField, IServiceProvider services) { await CrmSvcUtil.CrmSvcUtilLogger.TraceMethodStartAsync("Entering {0}", MethodBase.GetCurrentMethod().Name); await CrmSvcUtil.CrmSvcUtilLogger.TraceMethodStopAsync("Exiting {0}", MethodBase.GetCurrentMethod().Name); return(this.GetTypeForField(responseField.CLRFormatter, false)); }