public String GetNameForRequestField( SdkMessageRequest request, SdkMessageRequestField requestField, IServiceProvider services) { return(DefaultNamingService.GetNameForRequestField( request, requestField, services)); }
public override string GetNameForRequestField(SdkMessageRequest request, SdkMessageRequestField requestField, IServiceProvider services) { string returnValue = string.Empty; string defaultValue = base.GetNameForRequestField(request, requestField, services); foreach (var namer in _namers) { Trace.Debug($"Executing naming rule {nameof(GetNameForRequestField)} using {namer.GetType().FullName}"); returnValue = namer.GetNameForRequestField(request, requestField, services); } if (string.IsNullOrEmpty(returnValue)) { returnValue = defaultValue; } var cacheItem = DynamicsMetadataCache.SdkMessagePairs.GetOrParse(request.MessagePair); if (cacheItem != null) { cacheItem.GeneratedRequestTypeName = returnValue; } DynamicsMetadataCache.SdkMessagePairs.Set(cacheItem); return(string.IsNullOrEmpty(returnValue) ? defaultValue : returnValue); }
/// <inheritdoc /> public string GetNameForRequestField(SdkMessageRequest request, SdkMessageRequestField requestField, IServiceProvider services) { string value = _defaultService.GetNameForRequestField(request, requestField, services); value = ModifyPublisher(value); return(value); }
public string GetNameForRequestField(SdkMessageRequest request, SdkMessageRequestField requestField, IServiceProvider services) { var defaultName = DefaultService.GetNameForRequestField(request, requestField, services); return(CamelCaseMemberNames ? CamelCaser.Case(defaultName) : defaultName); }
public MetadataRequest(SdkMessageRequest request) { Id = request.Id; Name = request.Name; RequestFields = new Dictionary <int, MetadataRequestField>(); foreach (var field in request.RequestFields) { RequestFields[field.Key] = new MetadataRequestField(field.Value); } }
public SdkMessageRequest ToSdk(SdkMessagePair sdk) { var request = new SdkMessageRequest(sdk, Id, Name); foreach (var field in RequestFields) { request.RequestFields[field.Key] = field.Value.ToSdk(request); } return(request); }
async Task <string> INamingService.GetNameForRequestFieldAsync(SdkMessageRequest request, SdkMessageRequestField requestField, IServiceProvider services) { await CrmSvcUtil.CrmSvcUtilLogger.TraceMethodStartAsync("Entering {0}", MethodBase.GetCurrentMethod().Name); if (this._knowNames.ContainsKey(request.Id.ToString() + requestField.Index.ToString(CultureInfo.InvariantCulture))) { await CrmSvcUtil.CrmSvcUtilLogger.TraceMethodStopAsync("Exiting {0}", MethodBase.GetCurrentMethod().Name); return(this._knowNames[request.Id.ToString() + requestField.Index.ToString(CultureInfo.InvariantCulture)]); } var text = NamingService.CreateValidName(requestField.Name); this._knowNames.Add(request.Id.ToString() + requestField.Index.ToString(CultureInfo.InvariantCulture), text); await CrmSvcUtil.CrmSvcUtilLogger.TraceMethodStopAsync("Exiting {0}", MethodBase.GetCurrentMethod().Name); return(text); }
public CodeGenerationType GetTypeForRequestField(SdkMessageRequest request, SdkMessageRequestField requestField, IServiceProvider services) { return(DefaultService.GetTypeForRequestField(request, requestField, services)); }
protected virtual CodeGenerationType GetTypeForRequestFieldInternal(SdkMessageRequest request, SdkMessageRequestField requestField, IServiceProvider services) { return(DefaultService.GetTypeForRequestField(request, requestField, services)); }
/// <inheritdoc /> public string GetNameForRequestField(SdkMessageRequest request, SdkMessageRequestField requestField, IServiceProvider services) { return(NamingServiceImplementation.GetNameForRequestField(request, requestField, services)); }
internal SdkMessageRequestField ToSdk(SdkMessageRequest sdk) { return(new SdkMessageRequestField(sdk, Index, Name, CLRFormatter, IsOptional)); }
public string GetNameForRequestField(SdkMessageRequest request, Microsoft.Crm.Services.Utility.SdkMessageRequestField requestField, IServiceProvider services) { return(DefaultNamingService.GetNameForRequestField(request, requestField, services)); }