public string GetNameForResponseField(
            CodeGenerationSdkMessageResponse response
            , Entities.SdkMessageResponseField responseField
            , ICodeGenerationServiceProvider iCodeGenerationServiceProvider
            )
        {
            if (this._knowNames.ContainsKey(response.Id.ToString() + responseField.Position.GetValueOrDefault().ToString(CultureInfo.InvariantCulture)))
            {
                return(this._knowNames[response.Id.ToString() + responseField.Position.GetValueOrDefault().ToString(CultureInfo.InvariantCulture)]);
            }

            string validName = NamingService.CreateValidName(responseField.Name);

            this._knowNames.Add(response.Id.ToString() + responseField.Position.GetValueOrDefault().ToString(CultureInfo.InvariantCulture), validName);
            return(validName);
        }
Example #2
0
        public CodeGenerationSdkMessagePair(CodeGenerationSdkMessage message
                                            , Guid id
                                            , string messageNamespace
                                            , Entities.SdkMessageRequest request
                                            , Entities.SdkMessageResponse response
                                            )
        {
            this.Message          = message;
            this.Id               = id;
            this.MessageNamespace = messageNamespace;

            if (request != null)
            {
                this.Request = new CodeGenerationSdkMessageRequest(this, request.SdkMessageRequestId.Value, request.Name);
            }

            if (response != null)
            {
                this.Response = new CodeGenerationSdkMessageResponse(response.SdkMessageResponseId.Value);
            }
        }
 public IEnumerable <string> GetCommentsForResponseField(CodeGenerationSdkMessageResponse response, Entities.SdkMessageResponseField responseField, ICodeGenerationServiceProvider iCodeGenerationServiceProvider)
 {
     return(Enumerable.Empty <string>());
 }