cleaning duplicated definitions
This commit is contained in:
@ -30,10 +30,13 @@ namespace Yavsc.Controllers
|
||||
protected SiteSettings _siteSettings;
|
||||
protected SmtpSettings _smtpSettings;
|
||||
|
||||
protected ICalendarManager _calendarManager;
|
||||
|
||||
protected readonly ILogger _logger;
|
||||
public CommandController(ApplicationDbContext context, IOptions<GoogleAuthSettings> googleSettings,
|
||||
IGoogleCloudMessageSender GCMSender,
|
||||
UserManager<ApplicationUser> userManager,
|
||||
ICalendarManager calendarManager,
|
||||
IStringLocalizer<Yavsc.Resources.YavscLocalisation> localizer,
|
||||
IEmailSender emailSender,
|
||||
IOptions<SmtpSettings> smtpSettings,
|
||||
@ -47,6 +50,7 @@ namespace Yavsc.Controllers
|
||||
_userManager = userManager;
|
||||
_smtpSettings = smtpSettings.Value;
|
||||
_siteSettings = siteSettings.Value;
|
||||
_calendarManager = calendarManager;
|
||||
_localizer = localizer;
|
||||
_logger = loggerFactory.CreateLogger<CommandController>();
|
||||
}
|
||||
|
@ -38,14 +38,13 @@ namespace Yavsc.Controllers
|
||||
IEmailSender emailSender,
|
||||
IOptions<SmtpSettings> smtpSettings,
|
||||
IOptions<SiteSettings> siteSettings,
|
||||
ILoggerFactory loggerFactory) : base(context,googleSettings,GCMSender,userManager,
|
||||
localizer,emailSender,smtpSettings,siteSettings,loggerFactory)
|
||||
ICalendarManager calManager,
|
||||
ILoggerFactory loggerFactory) : base(context, googleSettings, GCMSender, userManager,
|
||||
calManager, localizer, emailSender, smtpSettings, siteSettings, loggerFactory)
|
||||
{
|
||||
this.payPalSettings = payPalSettings.Value;
|
||||
}
|
||||
PayPalSettings payPalSettings;
|
||||
|
||||
|
||||
private async Task<HairCutQuery> GetQuery(long id)
|
||||
{
|
||||
var query = await _context.HairCutQueries
|
||||
@ -288,6 +287,7 @@ Le client final: {clientFinal}
|
||||
|
||||
if (pro.AcceptPublicContact)
|
||||
{
|
||||
|
||||
if (pro.AcceptNotifications) {
|
||||
if (pro.Performer.Devices.Count > 0) {
|
||||
var regids = model.PerformerProfile.Performer
|
||||
@ -301,6 +301,19 @@ Le client final: {clientFinal}
|
||||
if (grep!=null)
|
||||
_logger.LogWarning($"Performer: {model.PerformerProfile.Performer.UserName} success: {grep.success} failure: {grep.failure}");
|
||||
}
|
||||
// TODO if pro.AllowCalendarEventInsert
|
||||
if (pro.Performer.DedicatedGoogleCalendar != null && yaev.EventDate != null) {
|
||||
_logger.LogInformation("Inserting an event in the calendar");
|
||||
DateTime evdate = yaev.EventDate ?? new DateTime();
|
||||
var result = await _calendarManager.CreateEventAsync(
|
||||
pro.Performer.DedicatedGoogleCalendar,
|
||||
evdate, 3600, yaev.Topic, yaev.Message,
|
||||
yaev.Location?.Address, false
|
||||
);
|
||||
if (result.Id == null)
|
||||
_logger.LogWarning("Something went wrong, calendar event not created");
|
||||
}
|
||||
else _logger.LogWarning($"Calendar: {pro.Performer.DedicatedGoogleCalendar != null}\nEventDate: {yaev.EventDate != null}");
|
||||
|
||||
await _emailSender.SendEmailAsync(
|
||||
_siteSettings, _smtpSettings,
|
||||
@ -432,12 +445,23 @@ Le client final: {clientFinal}
|
||||
grep = await _GCMSender.NotifyHairCutQueryAsync(_googleSettings,regids,yaev);
|
||||
}
|
||||
// TODO setup a profile choice to allow notifications
|
||||
// both on mailbox and mobile
|
||||
// both on mailbox and mobile, and to allow calendar event insertion.
|
||||
// if (grep==null || grep.success<=0 || grep.failure>0)
|
||||
ViewBag.GooglePayload=grep;
|
||||
if (grep!=null)
|
||||
_logger.LogWarning($"Performer: {command.PerformerProfile.Performer.UserName} success: {grep.success} failure: {grep.failure}");
|
||||
|
||||
|
||||
if (pro.Performer.DedicatedGoogleCalendar != null && yaev.EventDate != null) {
|
||||
DateTime evdate = yaev.EventDate ?? new DateTime();
|
||||
await _calendarManager.CreateEventAsync(
|
||||
pro.Performer.DedicatedGoogleCalendar,
|
||||
evdate, 3600, yaev.Topic, yaev.Message,
|
||||
yaev.Location?.ToString(), false
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
await _emailSender.SendEmailAsync(
|
||||
_siteSettings, _smtpSettings,
|
||||
command.PerformerProfile.Performer.Email,
|
||||
|
@ -24,7 +24,6 @@ namespace Yavsc.Controllers
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Services;
|
||||
using Yavsc.ViewModels.Manage;
|
||||
using Yavsc.Models.Calendar;
|
||||
using System.IO;
|
||||
|
||||
[Authorize]
|
||||
@ -123,7 +122,7 @@ namespace Yavsc.Controllers
|
||||
model.HaveProfessionalSettings = _dbContext.Performers.Any(x => x.PerformerId == user.Id);
|
||||
var usrActs = _dbContext.UserActivities.Include(a=>a.Does).Where(a=> a.UserId == user.Id);
|
||||
|
||||
model.HaveActivityToConfigure = usrActs.Any( a=> a.Settings == null && a.Does.SettingsClassName!=null );
|
||||
model.HaveActivityToConfigure = usrActs.Where( a => ( a.Does.SettingsClassName != null )).Count( a => a.Settings == null)>0;
|
||||
model.Activity = _dbContext.UserActivities.Include(a=>a.Does).Where(u=>u.UserId == user.Id).ToList();
|
||||
return View(model);
|
||||
}
|
||||
@ -282,12 +281,10 @@ namespace Yavsc.Controllers
|
||||
catch (WebException ex)
|
||||
{
|
||||
// a bug
|
||||
_logger.LogError("Google token, an Forbidden calendar");
|
||||
if (ex.HResult == (int)HttpStatusCode.Forbidden)
|
||||
{
|
||||
_logger.LogError("Google Api error");
|
||||
_logger.LogError("Code: "+ex.HResult+"\n"+ ex.Message);
|
||||
return RedirectToAction("LinkLogin", new { provider = "Google" });
|
||||
}
|
||||
}
|
||||
return View(new SetGoogleCalendarViewModel { ReturnUrl = returnUrl });
|
||||
}
|
||||
|
||||
|
@ -18,13 +18,6 @@
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using Newtonsoft.Json;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Net;
|
||||
using System.Web;
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -37,14 +30,12 @@ namespace Yavsc.Helpers
|
||||
using Models.Messaging;
|
||||
using Models;
|
||||
using Interfaces.Workflow;
|
||||
using Yavsc.Models.Google;
|
||||
using Yavsc.Models.Calendar;
|
||||
using Google.Apis.Auth.OAuth2;
|
||||
using Google.Apis.Auth.OAuth2.Responses;
|
||||
using Microsoft.Data.Entity;
|
||||
using Google.Apis.Auth.OAuth2.Flows;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
|
||||
using Yavsc.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Google helpers.
|
||||
@ -105,81 +96,32 @@ namespace Yavsc.Helpers
|
||||
);
|
||||
return googleLogin;
|
||||
}
|
||||
public static UserCredential GetGoogleCredential(IdentityUserLogin<string> googleUserLogin)
|
||||
public static UserCredential GetGoogleCredential(string googleUserLoginKey)
|
||||
{
|
||||
var googleId = googleUserLogin.ProviderKey;
|
||||
if (string.IsNullOrEmpty(googleId))
|
||||
if (string.IsNullOrEmpty(googleUserLoginKey))
|
||||
throw new InvalidOperationException("No Google login");
|
||||
TokenResponse resp = null;
|
||||
var flow = new GoogleAuthorizationCodeFlow(new GoogleAuthorizationCodeFlow.Initializer());
|
||||
return new UserCredential(flow, googleId, resp);
|
||||
throw new NotImplementedException();
|
||||
// TokenResponse resp = flow. ;
|
||||
// return new UserCredential(flow, googleUserLoginKey, resp);
|
||||
}
|
||||
static string evStatusDispo = "Dispo";
|
||||
|
||||
public static async Task<Period[]> GetFreeTime (this ICalendarManager manager, string calId, DateTime startDate, DateTime endDate)
|
||||
{
|
||||
CalendarEventList evlist = await manager.GetCalendarAsync(calId, startDate, endDate) ;
|
||||
var result = evlist.items
|
||||
var evlist = await manager.GetCalendarAsync(calId, startDate, endDate) ;
|
||||
var result = evlist.Items
|
||||
.Where(
|
||||
ev => ev.status == evStatusDispo
|
||||
ev => ev.Transparency == "transparent"
|
||||
)
|
||||
.Select(
|
||||
ev => new Period {
|
||||
Start = ev.start.datetime,
|
||||
End = ev.end.datetime
|
||||
Start = ev.Start.DateTime.Value,
|
||||
End = ev.End.DateTime.Value
|
||||
}
|
||||
);
|
||||
return result.ToArray();
|
||||
}
|
||||
|
||||
const string jwtHeader="{\"alg\":\"RS256\",\"typ\":\"JWT\"}";
|
||||
const string tokenEndPoint = "https://www.googleapis.com/oauth2/v4/token";
|
||||
|
||||
static long GetTimeSpan(long seconds) {
|
||||
var zero = new DateTime(1970,1,1);
|
||||
return zero.AddSeconds(seconds).ToFileTimeUtc();
|
||||
}
|
||||
|
||||
static object CreateGoogleServiceClaimSet(string scope, int expiresInSeconds) {
|
||||
return new {
|
||||
iss = Startup.GoogleSettings.Account.client_email,
|
||||
scope = scope,
|
||||
aud = "https://www.googleapis.com/oauth2/v4/token",
|
||||
exp = GetTimeSpan(expiresInSeconds),
|
||||
iat = DateTime.Now.ToFileTimeUtc()
|
||||
};
|
||||
}
|
||||
|
||||
public static async Task<string> GetJsonTokenAsync(string scope)
|
||||
{
|
||||
|
||||
var claimSet = CreateGoogleServiceClaimSet(scope, 3600);
|
||||
string jsonClaims = JsonConvert.SerializeObject(claimSet);
|
||||
string encClaims = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(jsonClaims));
|
||||
string tokenHeader = Convert.ToBase64String(Encoding.UTF8.GetBytes(jwtHeader))+"."+encClaims;
|
||||
|
||||
X509Certificate2 cert = new X509Certificate2();
|
||||
cert.Import(Convert.FromBase64String(Startup.GoogleSettings.Account.private_key));
|
||||
RSACryptoServiceProvider key = new RSACryptoServiceProvider();
|
||||
key.FromXmlString(cert.PrivateKey.ToXmlString(true));
|
||||
byte[] sig = key.SignData(Encoding.UTF8.GetBytes(tokenHeader), CryptoConfig.MapNameToOID("SHA256"));
|
||||
string assertion = tokenHeader+"."+Convert.ToBase64String(sig);
|
||||
HttpWebRequest webreq = WebRequest.CreateHttp ("https://www.googleapis.com/oauth2/v4/token");
|
||||
webreq.ContentType = "application/x-www-form-urlencoded";
|
||||
using (var inputstream = await webreq.GetRequestStreamAsync()) {
|
||||
var content = Encoding.UTF8.GetBytes( "grant_type="+ HttpUtility.UrlEncode(" urn:ietf:params:oauth:grant-type:jwt-bearer")+
|
||||
"&assertion="+HttpUtility.UrlEncode(assertion));
|
||||
await inputstream.WriteAsync(content,0,content.Length);
|
||||
}
|
||||
using (WebResponse resp = await webreq.GetResponseAsync ()) {
|
||||
using (Stream respstream = resp.GetResponseStream ()) {
|
||||
using (var rdr = new StreamReader(respstream)) {
|
||||
return await rdr.ReadToEndAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ DESTDIR=/srv/www/yavscpre
|
||||
PRODDESTDIR=/srv/www/yavsc
|
||||
ASPNET_ENV=Development
|
||||
CONFIGURATION=Release
|
||||
ASPNET_LOG_LEVEL=warn
|
||||
|
||||
all: bin/$(CONFIGURATION)
|
||||
|
||||
@ -21,7 +22,7 @@ project.lock.json: project.json
|
||||
dnu restore
|
||||
|
||||
watch: project.lock.json
|
||||
ASPNET_ENV=$(ASPNET_ENV) dnx-watch web --configuration=$(CONFIGURATION)
|
||||
ASPNET_ENV=$(ASPNET_ENV) ASPNET_LOG_LEVEL=$(ASPNET_LOG_LEVEL) dnx-watch web --configuration=$(CONFIGURATION)
|
||||
|
||||
run:
|
||||
ASPNET_ENV=$(ASPNET_ENV) dnx web --configuration=$(CONFIGURATION)
|
||||
|
@ -158,6 +158,8 @@ namespace Yavsc.Models
|
||||
using (var context = new ApplicationDbContext())
|
||||
{
|
||||
var item = this.Tokens.FirstOrDefault(x => x.UserId == googleUserId);
|
||||
// TODO Refresh token
|
||||
|
||||
return Task.FromResult(item);
|
||||
}
|
||||
}
|
||||
|
@ -18,12 +18,15 @@
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
|
||||
namespace Yavsc.Models.Google
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Calendar event list.
|
||||
/// </summary>
|
||||
[Obsolete("use GoogleUse.Apis")]
|
||||
public class CalendarEventList
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -19,11 +19,14 @@
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
|
||||
namespace Yavsc.Models.Google.Calendar
|
||||
{
|
||||
/// <summary>
|
||||
/// Calendar list.
|
||||
/// </summary>
|
||||
[Obsolete("use Google.Apis")]
|
||||
public class CalendarList {
|
||||
/// <summary>
|
||||
/// Gets or sets the kind.
|
||||
|
@ -19,11 +19,15 @@
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
|
||||
namespace Yavsc.Models.Google.Calendar
|
||||
{
|
||||
/// <summary>
|
||||
/// Calendar list entry.
|
||||
/// </summary>
|
||||
///
|
||||
[Obsolete("use GoogleUse.Apis")]
|
||||
public class CalendarListEntry {
|
||||
/// <summary>
|
||||
/// Gets or sets the kind.
|
||||
|
@ -1,5 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace Yavsc.Models.Google.Calendar
|
||||
{
|
||||
[Obsolete("use GoogleUse.Apis")]
|
||||
public class Reminder {
|
||||
/// <summary>
|
||||
/// Gets or sets the method.
|
||||
|
@ -29,11 +29,11 @@ namespace Yavsc.Models.Google
|
||||
/// <summary>
|
||||
/// The date.
|
||||
/// </summary>
|
||||
public DateTime date;
|
||||
public DateTime? date;
|
||||
/// <summary>
|
||||
/// The datetime.
|
||||
/// </summary>
|
||||
public DateTime datetime;
|
||||
public DateTime? datetime;
|
||||
/// <summary>
|
||||
/// The time zone.
|
||||
/// </summary>
|
||||
|
39
Yavsc/Services/GoogleApis/CalendarClient.cs
Normal file
39
Yavsc/Services/GoogleApis/CalendarClient.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using Google.Apis.Requests;
|
||||
using Google.Apis.Services;
|
||||
using Yavsc.Models.Google;
|
||||
|
||||
namespace Yavsc.Services.GoogleApis
|
||||
{
|
||||
public class CalendarClient : ClientServiceRequest<Resource>
|
||||
{
|
||||
public CalendarClient(IClientService service) : base (service) {
|
||||
|
||||
}
|
||||
public override string HttpMethod
|
||||
{
|
||||
get
|
||||
{
|
||||
return "POST";
|
||||
}
|
||||
}
|
||||
public string calendarId
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public override string MethodName
|
||||
{
|
||||
get
|
||||
{
|
||||
return "calendar.events.insert";
|
||||
}
|
||||
}
|
||||
|
||||
public override string RestPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return "calendars/{calendarId}/events";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -20,25 +20,22 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using Newtonsoft.Json;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.OptionsModel;
|
||||
using Google.Apis.Auth.OAuth2;
|
||||
using Google.Apis.Util.Store;
|
||||
using Google.Apis.Calendar.v3;
|
||||
using Google.Apis.Calendar.v3.Data;
|
||||
|
||||
namespace Yavsc.Models.Google.Calendar
|
||||
namespace Yavsc.Services
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using Models.Google;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Google.Apis.Services;
|
||||
using Yavsc.Helpers;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Calendar;
|
||||
using Yavsc.ViewModels.Calendar;
|
||||
|
||||
@ -47,6 +44,7 @@ namespace Yavsc.Models.Google.Calendar
|
||||
/// </summary>
|
||||
public class CalendarManager : ICalendarManager
|
||||
{
|
||||
public class ExpiredTokenException : Exception {}
|
||||
protected static string scopeCalendar = "https://www.googleapis.com/auth/calendar";
|
||||
private string _ApiKey;
|
||||
|
||||
@ -96,29 +94,11 @@ namespace Yavsc.Models.Google.Calendar
|
||||
/// <param name="userId">Yavsc user id</param>
|
||||
public async Task<CalendarList> GetCalendarsAsync (string userId)
|
||||
{
|
||||
var service = new CalendarService();
|
||||
|
||||
CalendarList res = null;
|
||||
var login = await _userManager.GetGoogleUserLoginAsync(_dbContext,userId);
|
||||
var token = await _dbContext.GetTokensAsync(login.ProviderKey);
|
||||
if (token==null)
|
||||
throw new InvalidOperationException("No Google token");
|
||||
var listRequest = service.CalendarList.List();
|
||||
|
||||
HttpWebRequest webreq = WebRequest.CreateHttp(getCalListUri);
|
||||
webreq.Headers.Add("Authorization", "Bearer "+ token.AccessToken);
|
||||
webreq.Method = "GET";
|
||||
webreq.ContentType = "application/http";
|
||||
using (WebResponse resp = webreq.GetResponse ()) {
|
||||
using (Stream respstream = resp.GetResponseStream ()) {
|
||||
using (var rdr = new StreamReader(respstream)) {
|
||||
string json = rdr.ReadToEnd();
|
||||
_logger.LogInformation(">> Json calendar list : "+json);
|
||||
res = JsonConvert.DeserializeObject<CalendarList>(json);
|
||||
}
|
||||
}
|
||||
resp.Close ();
|
||||
}
|
||||
webreq.Abort ();
|
||||
return res;
|
||||
return await listRequest.ExecuteAsync();
|
||||
}
|
||||
|
||||
|
||||
@ -138,49 +118,12 @@ namespace Yavsc.Models.Google.Calendar
|
||||
/// <param name="mindate">Mindate.</param>
|
||||
/// <param name="maxdate">Maxdate.</param>
|
||||
/// <param name="cred">credential string.</param>
|
||||
public async Task<CalendarEventList> GetCalendarAsync (string calid, DateTime mindate, DateTime maxdate)
|
||||
public async Task<Events> GetCalendarAsync (string calid, DateTime mindate, DateTime maxdate)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace (calid))
|
||||
throw new Exception ("the calendar identifier is not specified");
|
||||
var service = new CalendarService();
|
||||
|
||||
var creds = GetServiceAccountCredential();
|
||||
string uri = string.Format (
|
||||
getCalEntriesUri, HttpUtility.UrlEncode (calid)) +
|
||||
string.Format ("?orderBy=startTime&singleEvents=true&timeMin={0}&timeMax={1}&key=" + _ApiKey,
|
||||
HttpUtility.UrlEncode (mindate.ToString (dateFormat) + timeZone),
|
||||
HttpUtility.UrlEncode (maxdate.ToString (dateFormat) + timeZone));
|
||||
|
||||
HttpWebRequest webreq = WebRequest.CreateHttp (uri);
|
||||
|
||||
webreq.Headers.Add (HttpRequestHeader.Authorization, "Bearer "+ await creds.GetAccessTokenForRequestAsync());
|
||||
webreq.Method = "GET";
|
||||
webreq.ContentType = "application/http";
|
||||
CalendarEventList res = null;
|
||||
|
||||
try {
|
||||
using (WebResponse resp = await webreq.GetResponseAsync ()) {
|
||||
using (Stream respstream = resp.GetResponseStream ()) {
|
||||
try {
|
||||
using (var rdr = new StreamReader(respstream)) {
|
||||
string json = rdr.ReadToEnd();
|
||||
_logger.LogVerbose(">> Calendar: "+json);
|
||||
res = JsonConvert.DeserializeObject<CalendarEventList>(json);
|
||||
}
|
||||
} catch (Exception ) {
|
||||
respstream.Close ();
|
||||
resp.Close ();
|
||||
webreq.Abort ();
|
||||
throw ;
|
||||
}
|
||||
}
|
||||
resp.Close ();
|
||||
}
|
||||
} catch (WebException ) {
|
||||
webreq.Abort ();
|
||||
throw;
|
||||
}
|
||||
webreq.Abort ();
|
||||
return res;
|
||||
var listRequest = service.Events.List(calid);
|
||||
return await listRequest.ExecuteAsync();
|
||||
}
|
||||
public async Task<DateTimeChooserViewModel> CreateViewModelAsync(
|
||||
string inputId,
|
||||
@ -196,13 +139,17 @@ namespace Yavsc.Models.Google.Calendar
|
||||
List<Period> free = new List<Period> ();
|
||||
List<Period> busy = new List<Period> ();
|
||||
|
||||
foreach (var ev in eventList.items)
|
||||
foreach (var ev in eventList.Items)
|
||||
{
|
||||
if (ev.transparency == "transparent" )
|
||||
DateTime start = ev.Start.DateTime.Value;
|
||||
DateTime end = ev.End.DateTime.Value;
|
||||
|
||||
if (ev.Transparency == "transparent" )
|
||||
{
|
||||
free.Add(new Period { Start = ev.start.datetime, End = ev.end.datetime });
|
||||
|
||||
free.Add(new Period { Start = start, End = end });
|
||||
}
|
||||
else busy.Add(new Period { Start = ev.start.datetime, End = ev.end.datetime });
|
||||
else busy.Add(new Period { Start = start, End = end });
|
||||
}
|
||||
|
||||
return new DateTimeChooserViewModel {
|
||||
@ -228,396 +175,32 @@ namespace Yavsc.Models.Google.Calendar
|
||||
/// <param name="location"></param>
|
||||
/// <param name="available"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<Resource> CreateResourceAsync(string calid, DateTime startDate, int lengthInSeconds, string summary, string description, string location, bool available)
|
||||
public async Task<Event> CreateEventAsync(string calid, DateTime startDate, int lengthInSeconds, string summary, string description, string location, bool available)
|
||||
{
|
||||
|
||||
/* "insert": {
|
||||
"id": "calendar.events.insert",
|
||||
"path": "calendars/{calendarId}/events",
|
||||
"httpMethod": "POST",
|
||||
"description": "Creates an event.",
|
||||
"parameters": {
|
||||
"calendarId": {
|
||||
"type": "string",
|
||||
"description": "Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the \"primary\" keyword.",
|
||||
"required": true,
|
||||
"location": "path"
|
||||
},
|
||||
"maxAttendees": {
|
||||
"type": "integer",
|
||||
"description": "The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional.",
|
||||
"format": "int32",
|
||||
"minimum": "1",
|
||||
"location": "query"
|
||||
},
|
||||
"sendNotifications": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to send notifications about the creation of the new event. Optional. The default is False.",
|
||||
"location": "query"
|
||||
},
|
||||
"supportsAttachments": {
|
||||
"type": "boolean",
|
||||
"description": "Whether API client performing operation supports event attachments. Optional. The default is False.",
|
||||
"location": "query"
|
||||
}
|
||||
},
|
||||
"parameterOrder": [
|
||||
"calendarId"
|
||||
],
|
||||
"request": {
|
||||
"$ref": "Event"
|
||||
},
|
||||
"response": {
|
||||
"$ref": "Event"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/calendar"
|
||||
]
|
||||
},
|
||||
|
||||
"Event": {
|
||||
"id": "Event",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"anyoneCanAddSelf": {
|
||||
"type": "boolean",
|
||||
"description": "Whether anyone can invite themselves to the event (currently works for Google+ events only). Optional. The default is False.",
|
||||
"default": "false"
|
||||
},
|
||||
"attachments": {
|
||||
"type": "array",
|
||||
"description": "File attachments for the event. Currently only Google Drive attachments are supported.\nIn order to modify attachments the supportsAttachments request parameter should be set to true.\nThere can be at most 25 attachments per event,",
|
||||
"items": {
|
||||
"$ref": "EventAttachment"
|
||||
}
|
||||
},
|
||||
"attendees": {
|
||||
"type": "array",
|
||||
"description": "The attendees of the event. See the Events with attendees guide for more information on scheduling events with other calendar users.",
|
||||
"items": {
|
||||
"$ref": "EventAttendee"
|
||||
}
|
||||
},
|
||||
"attendeesOmitted": {
|
||||
"type": "boolean",
|
||||
"description": "Whether attendees may have been omitted from the event's representation. When retrieving an event, this may be due to a restriction specified by the maxAttendee query parameter. When updating an event, this can be used to only update the participant's response. Optional. The default is False.",
|
||||
"default": "false"
|
||||
},
|
||||
"colorId": {
|
||||
"type": "string",
|
||||
"description": "The color of the event. This is an ID referring to an entry in the event section of the colors definition (see the colors endpoint). Optional."
|
||||
},
|
||||
"created": {
|
||||
"type": "string",
|
||||
"description": "Creation time of the event (as a RFC3339 timestamp). Read-only.",
|
||||
"format": "date-time"
|
||||
},
|
||||
"creator": {
|
||||
"type": "object",
|
||||
"description": "The creator of the event. Read-only.",
|
||||
"properties": {
|
||||
"displayName": {
|
||||
"type": "string",
|
||||
"description": "The creator's name, if available."
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"description": "The creator's email address, if available."
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The creator's Profile ID, if available. It corresponds to theid field in the People collection of the Google+ API"
|
||||
},
|
||||
"self": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the creator corresponds to the calendar on which this copy of the event appears. Read-only. The default is False.",
|
||||
"default": "false"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": "Description of the event. Optional."
|
||||
},
|
||||
"end": {
|
||||
"$ref": "EventDateTime",
|
||||
"description": "The (exclusive) end time of the event. For a recurring event, this is the end time of the first instance.",
|
||||
"annotations": {
|
||||
"required": [
|
||||
"calendar.events.import",
|
||||
"calendar.events.insert",
|
||||
"calendar.events.update"
|
||||
]
|
||||
}
|
||||
},
|
||||
"endTimeUnspecified": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the end time is actually unspecified. An end time is still provided for compatibility reasons, even if this attribute is set to True. The default is False.",
|
||||
"default": "false"
|
||||
},
|
||||
"etag": {
|
||||
"type": "string",
|
||||
"description": "ETag of the resource."
|
||||
},
|
||||
"extendedProperties": {
|
||||
"type": "object",
|
||||
"description": "Extended properties of the event.",
|
||||
"properties": {
|
||||
"private": {
|
||||
"type": "object",
|
||||
"description": "Properties that are private to the copy of the event that appears on this calendar.",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"description": "The name of the private property and the corresponding value."
|
||||
}
|
||||
},
|
||||
"shared": {
|
||||
"type": "object",
|
||||
"description": "Properties that are shared between copies of the event on other attendees' calendars.",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"description": "The name of the shared property and the corresponding value."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"gadget": {
|
||||
"type": "object",
|
||||
"description": "A gadget that extends this event.",
|
||||
"properties": {
|
||||
"display": {
|
||||
"type": "string",
|
||||
"description": "The gadget's display mode. Optional. Possible values are: \n- \"icon\" - The gadget displays next to the event's title in the calendar view. \n- \"chip\" - The gadget displays when the event is clicked."
|
||||
},
|
||||
"height": {
|
||||
"type": "integer",
|
||||
"description": "The gadget's height in pixels. The height must be an integer greater than 0. Optional.",
|
||||
"format": "int32"
|
||||
},
|
||||
"iconLink": {
|
||||
"type": "string",
|
||||
"description": "The gadget's icon URL. The URL scheme must be HTTPS."
|
||||
},
|
||||
"link": {
|
||||
"type": "string",
|
||||
"description": "The gadget's URL. The URL scheme must be HTTPS."
|
||||
},
|
||||
"preferences": {
|
||||
"type": "object",
|
||||
"description": "Preferences.",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"description": "The preference name and corresponding value."
|
||||
}
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"description": "The gadget's title."
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "The gadget's type."
|
||||
},
|
||||
"width": {
|
||||
"type": "integer",
|
||||
"description": "The gadget's width in pixels. The width must be an integer greater than 0. Optional.",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
},
|
||||
"guestsCanInviteOthers": {
|
||||
"type": "boolean",
|
||||
"description": "Whether attendees other than the organizer can invite others to the event. Optional. The default is True.",
|
||||
"default": "true"
|
||||
},
|
||||
"guestsCanModify": {
|
||||
"type": "boolean",
|
||||
"description": "Whether attendees other than the organizer can modify the event. Optional. The default is False.",
|
||||
"default": "false"
|
||||
},
|
||||
"guestsCanSeeOtherGuests": {
|
||||
"type": "boolean",
|
||||
"description": "Whether attendees other than the organizer can see who the event's attendees are. Optional. The default is True.",
|
||||
"default": "true"
|
||||
},
|
||||
"hangoutLink": {
|
||||
"type": "string",
|
||||
"description": "An absolute link to the Google+ hangout associated with this event. Read-only."
|
||||
},
|
||||
"htmlLink": {
|
||||
"type": "string",
|
||||
"description": "An absolute link to this event in the Google Calendar Web UI. Read-only."
|
||||
},
|
||||
"iCalUID": {
|
||||
"type": "string",
|
||||
"description": "Event unique identifier as defined in RFC5545. It is used to uniquely identify events accross calendaring systems and must be supplied when importing events via the import method.\nNote that the icalUID and the id are not identical and only one of them should be supplied at event creation time. One difference in their semantics is that in recurring events, all occurrences of one event have different ids while they all share the same icalUIDs.",
|
||||
"annotations": {
|
||||
"required": [
|
||||
"calendar.events.import"
|
||||
]
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Opaque identifier of the event. When creating new single or recurring events, you can specify their IDs. Provided IDs must follow these rules: \n- characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938 \n- the length of the ID must be between 5 and 1024 characters \n- the ID must be unique per calendar Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time. To minimize the risk of collisions we recommend using an established UUID algorithm such as one described in RFC4122.\nIf you do not specify an ID, it will be automatically generated by the server.\nNote that the icalUID and the id are not identical and only one of them should be supplied at event creation time. One difference in their semantics is that in recurring events, all occurrences of one event have different ids while they all share the same icalUIDs."
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"description": "Type of the resource (\"calendar#event\").",
|
||||
"default": "calendar#event"
|
||||
},
|
||||
"location": {
|
||||
"type": "string",
|
||||
"description": "Geographic location of the event as free-form text. Optional."
|
||||
},
|
||||
"locked": {
|
||||
"type": "boolean",
|
||||
"description": "Whether this is a locked event copy where no changes can be made to the main event fields \"summary\", \"description\", \"location\", \"start\", \"end\" or \"recurrence\". The default is False. Read-Only.",
|
||||
"default": "false"
|
||||
},
|
||||
"organizer": {
|
||||
"type": "object",
|
||||
"description": "The organizer of the event. If the organizer is also an attendee, this is indicated with a separate entry in attendees with the organizer field set to True. To change the organizer, use the move operation. Read-only, except when importing an event.",
|
||||
"properties": {
|
||||
"displayName": {
|
||||
"type": "string",
|
||||
"description": "The organizer's name, if available."
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"description": "The organizer's email address, if available. It must be a valid email address as per RFC5322."
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The organizer's Profile ID, if available. It corresponds to theid field in the People collection of the Google+ API"
|
||||
},
|
||||
"self": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the organizer corresponds to the calendar on which this copy of the event appears. Read-only. The default is False.",
|
||||
"default": "false"
|
||||
}
|
||||
}
|
||||
},
|
||||
"originalStartTime": {
|
||||
"$ref": "EventDateTime",
|
||||
"description": "For an instance of a recurring event, this is the time at which this event would start according to the recurrence data in the recurring event identified by recurringEventId. Immutable."
|
||||
},
|
||||
"privateCopy": {
|
||||
"type": "boolean",
|
||||
"description": "Whether this is a private event copy where changes are not shared with other copies on other calendars. Optional. Immutable. The default is False.",
|
||||
"default": "false"
|
||||
},
|
||||
"recurrence": {
|
||||
"type": "array",
|
||||
"description": "List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event, as specified in RFC5545. Note that DTSTART and DTEND lines are not allowed in this field; event start and end times are specified in the start and end fields. This field is omitted for single events or instances of recurring events.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"recurringEventId": {
|
||||
"type": "string",
|
||||
"description": "For an instance of a recurring event, this is the id of the recurring event to which this instance belongs. Immutable."
|
||||
},
|
||||
"reminders": {
|
||||
"type": "object",
|
||||
"description": "Information about the event's reminders for the authenticated user.",
|
||||
"properties": {
|
||||
"overrides": {
|
||||
"type": "array",
|
||||
"description": "If the event doesn't use the default reminders, this lists the reminders specific to the event, or, if not set, indicates that no reminders are set for this event. The maximum number of override reminders is 5.",
|
||||
"items": {
|
||||
"$ref": "EventReminder"
|
||||
}
|
||||
},
|
||||
"useDefault": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the default reminders of the calendar apply to the event."
|
||||
}
|
||||
}
|
||||
},
|
||||
"sequence": {
|
||||
"type": "integer",
|
||||
"description": "Sequence number as per iCalendar.",
|
||||
"format": "int32"
|
||||
},
|
||||
"source": {
|
||||
"type": "object",
|
||||
"description": "Source from which the event was created. For example, a web page, an email message or any document identifiable by an URL with HTTP or HTTPS scheme. Can only be seen or modified by the creator of the event.",
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"description": "Title of the source; for example a title of a web page or an email subject."
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "URL of the source pointing to a resource. The URL scheme must be HTTP or HTTPS."
|
||||
}
|
||||
}
|
||||
},
|
||||
"start": {
|
||||
"$ref": "EventDateTime",
|
||||
"description": "The (inclusive) start time of the event. For a recurring event, this is the start time of the first instance.",
|
||||
"annotations": {
|
||||
"required": [
|
||||
"calendar.events.import",
|
||||
"calendar.events.insert",
|
||||
"calendar.events.update"
|
||||
]
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"description": "Status of the event. Optional. Possible values are: \n- \"confirmed\" - The event is confirmed. This is the default status. \n- \"tentative\" - The event is tentatively confirmed. \n- \"cancelled\" - The event is cancelled."
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "Title of the event."
|
||||
},
|
||||
"transparency": {
|
||||
"type": "string",
|
||||
"description": "Whether the event blocks time on the calendar. Optional. Possible values are: \n- \"opaque\" - The event blocks time on the calendar. This is the default value. \n- \"transparent\" - The event does not block time on the calendar.",
|
||||
"default": "opaque"
|
||||
},
|
||||
"updated": {
|
||||
"type": "string",
|
||||
"description": "Last modification time of the event (as a RFC3339 timestamp). Read-only.",
|
||||
"format": "date-time"
|
||||
},
|
||||
"visibility": {
|
||||
"type": "string",
|
||||
"description": "Visibility of the event. Optional. Possible values are: \n- \"default\" - Uses the default visibility for events on the calendar. This is the default value. \n- \"public\" - The event is public and event details are visible to all readers of the calendar. \n- \"private\" - The event is private and only event attendees may view event details. \n- \"confidential\" - The event is private. This value is provided for compatibility reasons.",
|
||||
"default": "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
*/
|
||||
|
||||
if (string.IsNullOrWhiteSpace (calid))
|
||||
throw new Exception ("the calendar identifier is not specified");
|
||||
var creds = GetServiceAccountCredential();
|
||||
GoogleCredential credential = await GoogleCredential.GetApplicationDefaultAsync();
|
||||
var computeService = new BaseClientService.Initializer()
|
||||
{
|
||||
HttpClientInitializer = credential
|
||||
};
|
||||
computeService.ApiKey = Startup.GoogleSettings.ApiKey;
|
||||
computeService.ApplicationName = "Yavsc";
|
||||
computeService.Validate();
|
||||
|
||||
using (var client = new HttpClient()) {
|
||||
using (var request = new HttpRequestMessage(HttpMethod.Post,
|
||||
string.Format("calendars/{calendarId}/events",calid))) {
|
||||
request.Content = new StringContent(
|
||||
JsonConvert.SerializeObject(
|
||||
new Resource {
|
||||
summary = "",
|
||||
description = "",
|
||||
start = new GDate{ datetime = startDate },
|
||||
end = new GDate{ datetime = startDate.AddSeconds(lengthInSeconds) },
|
||||
location = location,
|
||||
transparency = available ? "transparent" : null
|
||||
}
|
||||
));
|
||||
using (var response = await client.SendAsync(request)) {
|
||||
var payload = JObject.Parse(await response.Content.ReadAsStringAsync());
|
||||
return payload.ToObject<Resource>();
|
||||
}
|
||||
}
|
||||
var service = new CalendarService();
|
||||
Event ev = new Event {
|
||||
Start = new EventDateTime { DateTime = startDate },
|
||||
End = new EventDateTime { DateTime = startDate.AddSeconds(lengthInSeconds) },
|
||||
Summary = summary,
|
||||
Description = description
|
||||
};
|
||||
var insert = service.Events.Insert(ev,calid);
|
||||
var inserted = await insert.ExecuteAsync();
|
||||
|
||||
}
|
||||
return inserted;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
5636
Yavsc/Services/GoogleApis/Google.Apis.Calendar.v3.cs
Normal file
5636
Yavsc/Services/GoogleApis/Google.Apis.Calendar.v3.cs
Normal file
File diff suppressed because it is too large
Load Diff
@ -20,25 +20,23 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using Google.Apis.Calendar.v3.Data;
|
||||
|
||||
namespace Yavsc.Models.Calendar
|
||||
namespace Yavsc.Services
|
||||
{
|
||||
using System.Threading.Tasks;
|
||||
using Yavsc.Models.Google.Calendar;
|
||||
using Yavsc.Models.Google;
|
||||
using Yavsc.ViewModels.Calendar;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// I calendar manager.
|
||||
/// </summary>
|
||||
public interface ICalendarManager {
|
||||
Task<CalendarList> GetCalendarsAsync (string userId);
|
||||
Task<CalendarEventList> GetCalendarAsync (string calid, DateTime mindate, DateTime maxdate);
|
||||
Task<Events> GetCalendarAsync (string calid, DateTime mindate, DateTime maxdate);
|
||||
Task<DateTimeChooserViewModel> CreateViewModelAsync(
|
||||
string inputId,
|
||||
string calid, DateTime mindate, DateTime maxdate);
|
||||
Task<Resource> CreateResourceAsync(string calid,
|
||||
Task<Event> CreateEventAsync(string calid,
|
||||
DateTime startDate, int lengthInSeconds, string summary,
|
||||
string description, string location, bool available);
|
||||
}
|
||||
|
@ -32,8 +32,6 @@ namespace Yavsc
|
||||
using PayPal.Manager;
|
||||
using Services;
|
||||
using ViewModels.Auth.Handlers;
|
||||
using Yavsc.Models.Calendar;
|
||||
using Yavsc.Models.Google.Calendar;
|
||||
using static System.Environment;
|
||||
|
||||
public partial class Startup
|
||||
|
@ -2,7 +2,7 @@ using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Calendar;
|
||||
using Yavsc.Services;
|
||||
|
||||
namespace Yavsc.ViewComponents
|
||||
{
|
||||
|
@ -9,8 +9,9 @@
|
||||
{
|
||||
entryNum++;
|
||||
@if (calendar.accessRole=="owner") {
|
||||
<label >
|
||||
<input type="radio" name="GoogleCalendarId" value="@calendar.id" id="cal@entryNum">
|
||||
<label for="cal@entryNum">
|
||||
|
||||
<span style="background-color: @calendar.backgroundColor; foreground-color: @calendar.foregroundColor;">
|
||||
@calendar.summary </span>
|
||||
<i>"@calendar.description"</i>
|
||||
|
@ -15,7 +15,8 @@
|
||||
locale: 'fr',
|
||||
disabledDates: @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model.BusyDates)),
|
||||
maxDate: '@Model.MaxDate.ToString("MM/dd/yyyy")',
|
||||
minDate: '@Model.MinDate.ToString("MM/dd/yyyy")'
|
||||
minDate: '@Model.MinDate.ToString("MM/dd/yyyy")',
|
||||
format: 'MM/DD/YYYY hh:mm'
|
||||
});
|
||||
});
|
||||
</script>
|
@ -1233,6 +1233,22 @@
|
||||
<Content Include="ViewModels\Calendar\DateTimeChooserViewModel.cs" />
|
||||
<Content Include="wwwroot\lib\bootstrap-datepicker\bootstrap-datepicker.js" />
|
||||
<Content Include="Views\Manage\ChangeUserName.cshtml" />
|
||||
<Content Include="Controllers\Haircut\HairCutCommandController.cs" />
|
||||
<Content Include="GoogleApiSupport\Google.Apis.Core\Util\Utilities.cs" />
|
||||
<Content Include="GoogleApiSupport\Google.Apis.Core\ISerializer.cs" />
|
||||
<Content Include="GoogleApiSupport\Google.Apis.Core\GoogleApiException.cs" />
|
||||
<Content Include="GoogleApiSupport\Google.Apis.Core\ApplicationContext.cs" />
|
||||
<Content Include="GoogleApiSupport\Google.Apis\Requests\HttpRequestMessageExtenstions.cs" />
|
||||
<Content Include="GoogleApiSupport\Google.Apis.Core\Requests\RequestBuilder.cs" />
|
||||
<Content Include="GoogleApiSupport\Google.Apis.Core\Testing\VisibleForTestOnly.cs" />
|
||||
<Content Include="Services\GoogleApis\CalendarClient.cs" />
|
||||
<Content Include="GoogleApiSupport\Google.Apis.Core\Json\NewtonsoftJsonSerializer.cs" />
|
||||
<Content Include="GoogleApiSupport\Google.Apis.Core\Json\IJsonSerializer.cs" />
|
||||
<Content Include="GoogleApiSupport\Google.Apis.Core\Discovery\Features.cs" />
|
||||
<Content Include="GoogleApiSupport\Google.Apis.Core\Http\ConfigurableMessageHandler.cs" />
|
||||
<Content Include="GoogleApiSupport\Google.Apis.Core\Http\ConfigurableHttpClient.cs" />
|
||||
<Content Include="GoogleApiSupport\Google.Apis.Core\Http\IHttpClientFactory.cs" />
|
||||
<Content Include="Services\GoogleApis\Google.Apis.Calendar.v3.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="../Yavsc.Abstract/Yavsc.Abstract.csproj" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
|
Reference in New Issue
Block a user