常用方法
常用方法
常用方法
常用方法
/// <summary> /// Executes the operation's logic. /// </summary> /// <param name="context">The execution context for this operation.</param> protected override void Execute(IOperationContext context) { context.ThrowIfNull(nameof(context)); if (!typeof(IElevatedOperationContext).IsAssignableFrom(context.GetType())) { throw new ArgumentException($"{nameof(context)} must be an {nameof(IElevatedOperationContext)}."); } this.Execute(context as IElevatedOperationContext); }