/// <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; }
/// <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; } } } }
/// <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; } } } }