<% foreach (Product p in Model.Products ) { %>
- <%= Html.ActionLink( p.Name, "Product", new { id = ViewData["BrandName"], pc = Model.Reference , pref = p.Reference }, new { @class="actionlink" } ) %>
+ <%= Html.ActionLink( p.Name, "Product", new { id = ViewData["BrandId"], pc = Model.Reference , pref = p.Reference }, new { @class="actionlink" } ) %>
<%= p.Description %>
diff --git a/yavscModel/Calendar/EventPub.cs b/yavscModel/Calendar/EventPub.cs
index b3bebdfd..9ef1b145 100644
--- a/yavscModel/Calendar/EventPub.cs
+++ b/yavscModel/Calendar/EventPub.cs
@@ -24,6 +24,7 @@ using System.ComponentModel.DataAnnotations;
using Yavsc.ApiControllers.Calendar.Model;
using Yavsc.Model;
using Yavsc.Model.RolesAndMembers;
+using Yavsc.Model.Circles;
namespace Yavsc.ApiControllers.Calendar.Model
{
diff --git a/yavscModel/ChangeLog b/yavscModel/ChangeLog
index 65d238ab..455d1db6 100644
--- a/yavscModel/ChangeLog
+++ b/yavscModel/ChangeLog
@@ -1,3 +1,17 @@
+2015-06-10 Paul Schneider
+
+ * Circle.cs:
+ * CircleInfo.cs:
+ * CircleInfoCollection.cs: cleans imports
+
+ * CircleManager.cs: implements a circle manager
+
+ * CircleProvider.cs: Defines a default Circle provider
+
+ * EventPub.cs: refactoring
+
+ * YavscModel.csproj: Includes Circle provider definitions
+
2015-06-09 Paul Schneider
* LocalizedText.resx:
diff --git a/yavscModel/RolesAndMemebers/Circle.cs b/yavscModel/Circles/Circle.cs
similarity index 86%
rename from yavscModel/RolesAndMemebers/Circle.cs
rename to yavscModel/Circles/Circle.cs
index cfd05eff..4cc5e326 100644
--- a/yavscModel/RolesAndMemebers/Circle.cs
+++ b/yavscModel/Circles/Circle.cs
@@ -19,17 +19,21 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
using System;
-using System.Web.Http;
-using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;
-namespace Yavsc.Model.RolesAndMembers
+namespace Yavsc.Model.Circles
{
+
///
/// Circle.
///
public class Circle
{
+ ///
+ /// Gets or sets the identifier.
+ ///
+ /// The identifier.
+ public long Id { get; set; }
///
/// Gets or sets the title.
///
@@ -45,7 +49,7 @@ namespace Yavsc.Model.RolesAndMembers
///
/// Union the specified that.
///
- /// That.
+ /// Those circle about to be merged.
public static string [] Union (Circle []those)
{
List content = new List();
diff --git a/yavscModel/Circles/CircleInfo.cs b/yavscModel/Circles/CircleInfo.cs
new file mode 100644
index 00000000..410ddc83
--- /dev/null
+++ b/yavscModel/Circles/CircleInfo.cs
@@ -0,0 +1,42 @@
+//
+// CircleInfo.cs
+//
+// Author:
+// Paul Schneider
+//
+// Copyright (c) 2015 GNU GPL
+//
+// 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 .
+
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace Yavsc.Model.Circles
+{
+
+ ///
+ /// Circle info.
+ ///
+ public class CircleInfo
+ {
+ long Id { get; set; }
+ string Title { get; set; }
+ CircleInfo(Circle c)
+ {
+ Id = c.Id;
+ Title = c.Title;
+ }
+ }
+
+}
diff --git a/yavscModel/Circles/CircleInfoCollection.cs b/yavscModel/Circles/CircleInfoCollection.cs
new file mode 100644
index 00000000..fd72868e
--- /dev/null
+++ b/yavscModel/Circles/CircleInfoCollection.cs
@@ -0,0 +1,35 @@
+//
+// CircleInfoCollection.cs
+//
+// Author:
+// Paul Schneider
+//
+// Copyright (c) 2015 GNU GPL
+//
+// 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 .
+
+using System;
+using System.Collections.Generic;
+
+namespace Yavsc.Model.Circles
+{
+
+ ///
+ /// Circle info collection.
+ ///
+ public class CircleInfoCollection : List
+ {
+ }
+
+}
diff --git a/yavscModel/Circles/CircleManager.cs b/yavscModel/Circles/CircleManager.cs
new file mode 100644
index 00000000..f349829b
--- /dev/null
+++ b/yavscModel/Circles/CircleManager.cs
@@ -0,0 +1,115 @@
+//
+// CircleManager.cs
+//
+// Author:
+// Paul Schneider
+//
+// Copyright (c) 2015 GNU GPL
+//
+// 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 .
+using System;
+using System.Security.Permissions;
+using System.Configuration;
+using System.Collections.Specialized;
+using System.Collections;
+using System.Reflection;
+
+namespace Yavsc.Model.Circles
+{
+ ///
+ /// Circle manager.
+ ///
+ public class CircleManager
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public CircleManager ()
+ {
+ }
+ private static CircleProvider defaultProvider=null;
+ ///
+ /// Gets the default provider.
+ ///
+ /// The default provider.
+ public static CircleProvider DefaultProvider {
+ get {
+ if (defaultProvider == null)
+ GetProviderSettings ();
+ return defaultProvider;
+ }
+ }
+
+ [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
+ private static void GetProviderSettings()
+ {
+ System.Configuration.Configuration config =
+ ConfigurationManager.OpenExeConfiguration(
+ ConfigurationUserLevel.None);
+
+ ProtectedConfigurationSection pSection =
+ config.GetSection("circleProviders")
+ as ProtectedConfigurationSection;
+
+
+ ProviderSettingsCollection providerSettings =
+ pSection.Providers;
+ if (pSection.DefaultProvider != null) {
+ ConstructorInfo ci = Type.GetType (providerSettings [pSection.DefaultProvider].Type).GetConstructor (Type.EmptyTypes);
+ defaultProvider = ci.Invoke (Type.EmptyTypes) as CircleProvider;
+ }
+ /*
+
+ foreach (ProviderSettings pSettings in
+ providerSettings)
+
+
+ {
+
+
+ Console.WriteLine(
+ "Provider settings name: {0}",
+ pSettings.Name);
+
+
+ Console.WriteLine(
+ "Provider settings type: {0}",
+ pSettings.Type);
+
+ NameValueCollection parameters =
+ pSettings.Parameters;
+
+ IEnumerator pEnum =
+ parameters.GetEnumerator();
+
+ int i = 0;
+ while (pEnum.MoveNext())
+ {
+ string pLength =
+ parameters[i].Length.ToString();
+ Console.WriteLine(
+ "Provider ssettings: {0} has {1} parameters",
+ pSettings.Name, pLength);
+
+ }
+
+
+ }
+ */
+
+ }
+
+ }
+}
+
diff --git a/yavscModel/Circles/CircleProvider.cs b/yavscModel/Circles/CircleProvider.cs
new file mode 100644
index 00000000..cebabb32
--- /dev/null
+++ b/yavscModel/Circles/CircleProvider.cs
@@ -0,0 +1,75 @@
+//
+// CircleManager.cs
+//
+// Author:
+// Paul Schneider
+//
+// Copyright (c) 2015 GNU GPL
+//
+// 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 .
+using System;
+using System.Security.Permissions;
+using System.Configuration;
+using System.Collections.Specialized;
+using System.Collections;
+using System.Reflection;
+using System.Configuration.Provider;
+
+namespace Yavsc.Model.Circles
+{
+ ///
+ /// Circle provider.
+ ///
+ public class CircleProvider: ProviderBase
+ {
+ ///
+ /// Add the specified title and users.
+ ///
+ /// Title.
+ /// Users.
+ public void Add(string owner, string title, string [] users)
+ {
+ throw new NotImplementedException ();
+ }
+ ///
+ /// Delete the specified id.
+ ///
+ /// Title.
+ public void Delete(string owner, string title)
+ {
+ throw new NotImplementedException ();
+ }
+
+ ///
+ /// Get the specified id.
+ ///
+ /// Title.
+ public Circle Get(string owner, string title)
+ {
+ throw new NotImplementedException ();
+ }
+
+
+ ///
+ /// List this instance.
+ ///
+ public CircleInfoCollection List()
+ {
+ throw new NotImplementedException ();
+ }
+
+ }
+
+}
+
diff --git a/yavscModel/YavscModel.csproj b/yavscModel/YavscModel.csproj
index 1a2d4c17..c6f1866f 100644
--- a/yavscModel/YavscModel.csproj
+++ b/yavscModel/YavscModel.csproj
@@ -36,11 +36,11 @@
-
+
@@ -155,10 +155,14 @@
-
+
+
+
+
+
@@ -172,6 +176,7 @@
+