现在,任何在我的项目中创建分支并向其添加.gitlab-ci.yml文件的人都可以使用运行程序在我的服务器上执行命令.如何才能使主持人或所有者可以上传CI配置文件并对其进行更改?
我正在使用https://gitlab.com/gitlab-org/gitlab-ci-multi-runner在bash上运行.
我使用的是 mudblazor 6.10.0,我遇到了对话框未显示的问题,即使我使用开箱即用的对话框也无法打开。我在控制台上没有收到错误,代码中也没有发生错误,但对话框根本不显示。单击按钮会调用 ToggleOpen 代码,但不显示对话框。
我的组件
@using Microsoft.AspNetCore.Components
@using MudBlazor
<MudDialog>
<TitleContent>
<MudText Typo="Typo.h6">
<MudIcon Icon="@Icons.Material.Outlined.Edit" Class="mr-3 mb-n1"/>
Changes made by @User.Name
</MudText>
</TitleContent>
<DialogContent>
<MudTextField Disabled="true" Label="Before" @bind-Value="User.Change" Multiline="true" />
</DialogContent>
<DialogActions>
<MudButton Color="Color.Primary" OnClick="Close">Ok</MudButton>
</DialogActions>
</MudDialog>
@code {
[CascadingParameter] MudDialogInstance MudDialog { get; set; }
[Parameter]
public UserChange User { get; set; }
private void Close() => MudDialog.Close(DialogResult.Ok(true));
}
Run Code Online (Sandbox Code Playgroud)
与调用父组件
@page "/"
@using MudBlazor
@inject UserChangesService UserChangesService
@inject IDialogService DialogService
<MudText Typo="Typo.h2" Color="Color.Info">Welcome</MudText>
<MudGrid>
<MudItem xs="12" sm="6">
<MudCard> …Run Code Online (Sandbox Code Playgroud) 在创建自定义记录器示例IDisposable BeginScope<TState>(TState state);中,接口的功能ILogger被实现为return default!;没有解释BeginScope甚至是什么以及为什么default!使用。
我特别感兴趣为什么!这里使用 null 宽容运算符。
public IDisposable BeginScope<TState>(TState state) => default!;
Run Code Online (Sandbox Code Playgroud)