/// <summary> /// 构造一个内容图形 API 变化。 /// </summary> /// <param name="accessor">给定的 <see cref="IAccessor"/>。</param> /// <param name="loggerFactory">给定的 <see cref="ILoggerFactory"/>。</param> public ContentGraphApiMutation(IAccessor accessor, ILoggerFactory loggerFactory) : base(loggerFactory) { ContentAccessor = accessor.CastTo <IAccessor, IContentAccessor <TCategory, TSource, TClaim, TTag, TUnit, TUnitClaim, TUnitTag, TUnitVisitCount, TPane, TPaneClaim> >(nameof(accessor)); AddCategoryTypeField(); }
/// <summary> /// 构造一个内容图形 API 查询。 /// </summary> /// <param name="accessor">给定的 <see cref="IAccessor"/>。</param> /// <param name="dependency">给定的 <see cref="ContentBuilderDependency"/>。</param> /// <param name="loggerFactory">给定的 <see cref="ILoggerFactory"/>。</param> public ContentGraphApiQuery(IAccessor accessor, ContentBuilderDependency dependency, ILoggerFactory loggerFactory) : base(loggerFactory) { ContentAccessor = accessor.CastTo <IAccessor, IContentAccessor <TCategory, TSource, TClaim, TTag, TUnit, TUnitClaim, TUnitTag, TUnitVisitCount, TPane, TPaneClaim> >(nameof(accessor)); Dependency = dependency.NotNull(nameof(dependency)); AddCategoryTypeFields(); AddSourceTypeFields(); AddClaimTypeFields(); AddTagTypeFields(); AddUnitTypeFields(); AddPaneTypeFields(); AddPaneUnitTypeFields(); }