/// <summary> /// Create new instance of <see cref="GraphUri"/> /// </summary> /// <param name="identity">Identity.</param> /// <param name="subEntity">Sub entity.</param> /// <param name="beta">Connect to beta endpoint.</param> internal GraphUri(IGraphIdentity identity, EntityPath subEntity, bool beta) { identity.ThrowIfNull(nameof(identity)); subEntity.ThrowIfNull(nameof(subEntity)); this.IsBeta = beta; this.Identity = identity; this.restUri = new HttpRestUri( $"{GraphUri.baseGraphUri}/{this.GetServiceInstance()}/{this.Identity.GetSubEntityFullPath(subEntity)}"); }
/// <summary> /// Create <see cref="ExchangeService"/> for specific identity. /// </summary> /// <param name="identity">Identity - user or group.</param> /// <returns></returns> public ExchangeService this[IGraphIdentity identity] { get { return(new ExchangeService( identity, this.AuthorizationProvider, this.jsonConverter, this.UserAgent, this.Beta)); } }