首页 > 解决方案 > 在 C# 方法中作为参数传递的注释?

问题描述

我希望使用以下方法,但这是我第一次遇到列为该方法的第二个参数的内容。应该去那里,是什么意思?

在此处输入图像描述

这是该方法来自的 github 存储库: https ://github.com/jguertl/SharePlugin

标签: c#annotationsparameter-passingsquare-bracket

解决方案


我没有使用过该库,但ShareOptions.cs似乎有很好的记录:https ://github.com/jguertl/SharePlugin/blob/master/Share/Share.Plugin.Abstractions/ShareOptions.cs

/// <summary>
/// Platform specific Share Options
/// </summary>
public class ShareOptions
{
    /// <summary>
    /// Android: Gets or sets the title of the app chooser popup.
    /// If null (default) the system default title is used.
    /// </summary>
    public string ChooserTitle { get; set; } = null;

    /// <summary>
    /// Tizen: Excluded App Types
    /// </summary>
    public ShareAppControlType ExcludedAppControlTypes { get; set; } = 0;

    /// <summary>
    /// iOS: Gets or sets the UIActivityTypes that should not be displayed.
    /// If null (default) the value of <see cref="Plugin.Share.ShareImplementation.ExcludedUIActivityTypes"/> is used.
    /// </summary>
    public ShareUIActivityType[] ExcludedUIActivityTypes { get; set; } = null;    

    /// <summary>
    /// iOS only: Gets or sets the popover anchor rectangle.
    /// If null (default) the option is not used.
    /// </summary>
    public ShareRectangle PopoverAnchorRectangle { get; set; } = null;
}

推荐阅读