refactoring
This commit is contained in:
parent
71f0d756b3
commit
d327f4d77e
18 changed files with 91 additions and 96 deletions
64
yavscModel/RolesAndMemebers/Circle.cs
Normal file
64
yavscModel/RolesAndMemebers/Circle.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
//
|
||||
// Circle.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 Paul Schneider
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// 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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Model.RolesAndMembers
|
||||
{
|
||||
/// <summary>
|
||||
/// Circle.
|
||||
/// </summary>
|
||||
public class Circle
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the title.
|
||||
/// </summary>
|
||||
/// <value>The title.</value>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the users.
|
||||
/// </summary>
|
||||
/// <value>The users.</value>
|
||||
public string [] Users { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Union the specified that.
|
||||
/// </summary>
|
||||
/// <param name="that">That.</param>
|
||||
public static string [] Union (Circle []those)
|
||||
{
|
||||
List<string> content = new List<string>();
|
||||
foreach (Circle c in those) {
|
||||
foreach (string user_name in c.Users) {
|
||||
if (!content.Contains (user_name))
|
||||
content.Add (user_name);
|
||||
}
|
||||
}
|
||||
return content.ToArray ();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
74
yavscModel/RolesAndMemebers/ProviderPublicInfo.cs
Normal file
74
yavscModel/RolesAndMemebers/ProviderPublicInfo.cs
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
//
|
||||
// ProviderPublicInfo.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 Paul Schneider
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// 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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.ApiControllers.Calendar.Model;
|
||||
|
||||
namespace Yavsc.Model.RolesAndMembers
|
||||
{
|
||||
/// <summary>
|
||||
/// Provider public info.
|
||||
/// </summary>
|
||||
public class ProviderPublicInfo {
|
||||
/// <summary>
|
||||
/// Gets or sets the display name.
|
||||
/// </summary>
|
||||
/// <value>The display name.</value>
|
||||
[Required]
|
||||
public string DisplayName { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the location.
|
||||
/// </summary>
|
||||
/// <value>The type of the location.</value>
|
||||
[Required]
|
||||
public string LocationType { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the location.
|
||||
/// </summary>
|
||||
/// <value>The location.</value>
|
||||
[Required]
|
||||
public Position Location { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the logo image locator.
|
||||
/// </summary>
|
||||
/// <value>The logo image locator.</value>
|
||||
public string LogoImgLocator { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the description.
|
||||
/// </summary>
|
||||
/// <value>The description.</value>
|
||||
[Required]
|
||||
public string Description { get; set;}
|
||||
/// <summary>
|
||||
/// Gets or sets the web page.
|
||||
/// </summary>
|
||||
/// <value>The web page.</value>
|
||||
public string WebPage { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the calendar.
|
||||
/// </summary>
|
||||
/// <value>The calendar.</value>
|
||||
public Schedule Calendar { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
43
yavscModel/RolesAndMemebers/Publishing.cs
Normal file
43
yavscModel/RolesAndMemebers/Publishing.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
//
|
||||
// Publishing.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 Paul Schneider
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// 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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Model.RolesAndMembers
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Publishing.
|
||||
/// </summary>
|
||||
public enum Publishing {
|
||||
/// <summary>
|
||||
/// The private.
|
||||
/// </summary>
|
||||
Private,
|
||||
/// <summary>
|
||||
/// The public.
|
||||
/// </summary>
|
||||
Public
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue