line21c/google-api-dotnet-client

Initialize sub-resources in generated code

Closed this issue · 3 comments

Where resources have resources the sub-resources never get constructed.

e.g. DiacritizeService will not work the corpus member is never Initialized.

public class Diacritize {
        private Google.Apis.Discovery.ISchemaAwareRequestExecutor service;
        private const string Resource = "diacritize";
        private log4net.ILog logger = log4net.LogManager.GetLogger(typeof(Diacritize));
        private Corpus corpus;
        public Diacritize(DiacritizeService service) {
            this.service = service;
        }
        public virtual Corpus Corpus {
            get {
                return this.corpus;
            }
        }
    }


Constructor should be creating Corpus

public Diacritize(DiacritizeService service) 
{
      this.service = service;
      this.corpus = new Corpus(service);
}



Original issue reported on code.google.com by davidwat...@google.com on 23 May 2011 at 4:46

Original comment by davidwat...@google.com on 1 Jun 2011 at 8:53

Original comment by mlin...@google.com on 1 Jun 2011 at 3:10

  • Changed state: Started

Original comment by mlin...@google.com on 7 Jun 2011 at 9:36

  • Changed state: Fixed