示例#1
0
        /// <summary>
        /// Initializes a new instance of the CsDocument class.
        /// </summary>
        /// <param name="proxy">Proxy object for the document.</param>
        /// <param name="name">The name of the document.</param>
        /// <param name="path">The path to the original source.</param>
        /// <param name="partialElementsService">The optional partial elements service.</param>
        internal CsDocument(CodeUnitProxy proxy, string name, string path, IPartialElementsService partialElementsService)
            : base(proxy, ElementType.Document, name, null, false)
        {
            Param.AssertNotNull(proxy, "proxy");
            Param.AssertValidString(name, "name");
            Param.AssertValidString(path, "path");
            Param.Ignore(partialElementsService);

            this.name = name;
            this.path = path;
            this.partialElementsService = partialElementsService;
        }
示例#2
0
        /// <summary>
        /// Registers optional services.
        /// </summary>
        /// <param name="services">The optional services.</param>
        private void RegisterServices(IEnumerable <ICSharpCodeModelService> services)
        {
            Param.Ignore(services);

            if (services != null)
            {
                foreach (ICSharpCodeModelService service in services)
                {
                    IPartialElementsService p = service as IPartialElementsService;
                    if (p != null)
                    {
                        this.partialElementService = p;
                    }
                }
            }
        }
示例#3
0
        /// <summary>
        /// Registers optional services.
        /// </summary>
        /// <param name="services">The optional services.</param>
        private void RegisterServices(IEnumerable<ICSharpCodeModelService> services)
        {
            Param.Ignore(services);

            if (services != null)
            {
                foreach (ICSharpCodeModelService service in services)
                {
                    IPartialElementsService p = service as IPartialElementsService;
                    if (p != null)
                    {
                        this.partialElementService = p;
                    }
                }
            }
        }