コード例 #1
0
        protected CsClass Get(string name, out CsFile file)
        {
            var info = CsFilesManager.Instance.GetFileInfo(name, _nameSpace);

            file = info.File;
            if (!info.IsEmbedded)
            {
                PrepareFile(file);
            }
            var ns = file.GetOrCreateNamespace(_nameSpace);

            var t = ns.GetOrCreateClass(name);

            t.IsPartial = true;


            if (!info.IsEmbedded)
            {
                var filename = Path.Combine(_output, name + ".auto.cs");
                file.SaveIfDifferent(filename);
            }

            return(t);
        }