Getting “Show me” Available/busy value in Google (Calendar Events) .Net API

后端 未结 2 929
迷失自我
迷失自我 2021-01-20 00:39

Does anyone know how do get the \"show me\" value using Google .NET API? I know how to get mosts of the EventEntry details I just cant get this one out.

it is the on

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-20 01:27

    I created an extension method that handles this:

    /// 
    /// Determines whether or not the EventEntry is set as Busy.
    /// 
    /// The Google EventEntry.
    public static bool IsBusy(this EventEntry entry)
    {
        return entry.EventTransparency.Value.Equals("http://schemas.google.com/g/2005#event.opaque");
    }
    

    Usage:

    EventEntry eventEntry = ... 
    bool isBusy = eventEntry.IsBusy();
    

提交回复
热议问题