Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated to version 1.0.2

Fixed a bug with XProperty3() unit test that rendered it ineffective at testing anything.
Fixed a bug with assignment of TZID within the FromSystemTimeZone() method.
Fixed a bug with the TimeZoneName property that was causing it to malfunction.
Added additional time-zone related code to iCalDateTime.
Fixed a bug with UTCOffset that caused it to return incorrect times.
  • Loading branch information...
commit c4533e41365c27fb2798785c52781a6220568da2 1 parent d2d7d35
dougday authored
Showing with 239 additions and 124 deletions.
  1. +2 −2 DDay.iCal.Test/Properties/AssemblyInfo.cs.template
  2. +2 −2 DDay.iCal.Test/SerializationTest.cs
  3. BIN  DDay.iCal.dll
  4. +1 −1  DDay.iCal/Components/CalendarComponent.cs
  5. +2 −3 DDay.iCal/Components/iCalTimeZone.cs
  6. +5 −16 DDay.iCal/Components/iCalTimeZoneInfo.cs
  7. +2 −2 DDay.iCal/DataTypes/UTCOffset.cs
  8. +86 −28 DDay.iCal/DataTypes/iCalDateTime.cs
  9. +1 −1  DDay.iCal/Evaluation/RecurrencePatternEvaluator.cs
  10. +4 −0 DDay.iCal/Evaluation/TimeZoneEvaluator.cs
  11. +8 −2 DDay.iCal/General/CalendarPropertyList.cs
  12. +4 −2 DDay.iCal/Interfaces/DataTypes/IDateTime.cs
  13. +2 −2 DDay.iCal/Properties/AssemblyInfo.cs.template
  14. +1 −4 DDay.iCal/Utility/DateUtil.cs
  15. +7 −3 DDay.iCal/Utility/RecurrenceUtil.cs
  16. +7 −1 Examples/C#/Example1/Example1.csproj
  17. +2 −2 Examples/C#/Example1/Example1.sln
  18. +18 −26 Examples/C#/Example1/Properties/Resources.Designer.cs
  19. +10 −14 Examples/C#/Example1/Properties/Settings.Designer.cs
  20. +6 −1 Examples/C#/Example2/Example2.csproj
  21. +2 −2 Examples/C#/Example2/Example2.sln
  22. BIN  Examples/C#/Example5/Bin/DDay.iCal.dll
  23. +4 −3 Examples/C#/Example5/Example5.sln
  24. +55 −4 Examples/C#/Example5/Web.Config
  25. +6 −1 Examples/C#/Example6/Example6.csproj
  26. +2 −2 Examples/C#/Example6/Example6.sln
View
4 DDay.iCal.Test/Properties/AssemblyInfo.cs.template
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.1.$WCREV$")]
-[assembly: AssemblyFileVersion("1.0.1.$WCREV$")]
+[assembly: AssemblyVersion("1.0.2.$WCREV$")]
+[assembly: AssemblyFileVersion("1.0.2.$WCREV$")]
View
4 DDay.iCal.Test/SerializationTest.cs
@@ -1156,10 +1156,10 @@ public void XProperty3()
htmlBuilder.Append("<HTML><HEAD><META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html;charset=iso-8859-1\"></HEAD><BODY>");
htmlBuilder.Append("<B>Test</B>");
htmlBuilder.Append("</BODY></HTML>");
-
- // This adds the property to the event automatically
+
ICalendarProperty p = new CalendarProperty("X-ALT-DESC", htmlBuilder.ToString());
p.Parameters.Add(new CalendarParameter("FMTTYPE", "text/html"));
+ evt.Properties.Add(p);
iCalendarSerializer serializer = new iCalendarSerializer();
serializer.Serialize(iCal, @"Calendars\Serialization\XProperty3.ics");
View
BIN  DDay.iCal.dll
Binary file not shown
View
2  DDay.iCal/Components/CalendarComponent.cs
@@ -161,7 +161,7 @@ virtual public void AddProperty(string name, string value)
/// <summary>
/// Adds a property to this component.
/// </summary>
- virtual public void AddProperty(CalendarProperty p)
+ virtual public void AddProperty(ICalendarProperty p)
{
p.Parent = this;
Properties[p.Name] = p;
View
5 DDay.iCal/Components/iCalTimeZone.cs
@@ -67,8 +67,9 @@ public static iCalTimeZone FromSystemTimeZone(System.TimeZoneInfo tzinfo, DateTi
var adjustmentRules = tzinfo.GetAdjustmentRules();
var utcOffset = tzinfo.BaseUtcOffset;
var dday_tz = new iCalTimeZone();
- IDateTime earliest = new iCalDateTime(earlistDateTimeToSupport);
+ dday_tz.TZID = tzinfo.Id;
+ IDateTime earliest = new iCalDateTime(earlistDateTimeToSupport);
foreach (var adjustmentRule in adjustmentRules)
{
// Only include historical data if asked to do so. Otherwise,
@@ -77,8 +78,6 @@ public static iCalTimeZone FromSystemTimeZone(System.TimeZoneInfo tzinfo, DateTi
continue;
var delta = adjustmentRule.DaylightDelta;
- dday_tz.TZID = tzinfo.Id;
-
var dday_tzinfo_standard = new DDay.iCal.iCalTimeZoneInfo();
dday_tzinfo_standard.Name = "STANDARD";
dday_tzinfo_standard.TimeZoneName = tzinfo.StandardName;
View
21 DDay.iCal/Components/iCalTimeZoneInfo.cs
@@ -101,25 +101,14 @@ virtual public string TimeZoneName
{
get
{
- IList<string> tzNames = TimeZoneNames;
- if (tzNames != null &&
- tzNames.Count > 0)
- return tzNames[0];
+ if (TimeZoneNames.Count > 0)
+ return TimeZoneNames[0];
return null;
}
set
{
- IList<string> tzNames = TimeZoneNames;
- if (tzNames != null &&
- tzNames.Count > 0)
- tzNames[0] = value;
- else
- {
- if (value != null)
- tzNames = new List<string>(new string[] { value });
- else
- tzNames = null;
- }
+ TimeZoneNames.Clear();
+ TimeZoneNames.Add(value);
}
}
@@ -165,7 +154,7 @@ virtual public IList<string> TimeZoneNames
dt = new iCalDateTime(OffsetTo.ToUTC(dt.Value));
normalizedDt = OffsetTo.ToUTC(normalizedDt);
}
-
+
// Let's evaluate our time zone observances to find the
// observance that applies to this date/time value.
IEvaluator parentEval = Parent.GetService(typeof(IEvaluator)) as IEvaluator;
View
4 DDay.iCal/DataTypes/UTCOffset.cs
@@ -153,12 +153,12 @@ private DateTime Offset(DateTime dt, bool positive)
virtual public DateTime ToUTC(DateTime dt)
{
- return Offset(dt, !Positive);
+ return DateTime.SpecifyKind(Offset(dt, !Positive), DateTimeKind.Utc);
}
virtual public DateTime ToLocal(DateTime dt)
{
- return Offset(dt, Positive);
+ return DateTime.SpecifyKind(Offset(dt, Positive), DateTimeKind.Local);
}
#endregion
View
114 DDay.iCal/DataTypes/iCalDateTime.cs
@@ -13,8 +13,7 @@ namespace DDay.iCal
/// The iCalendar equivalent of the .NET <see cref="DateTime"/> class.
/// <remarks>
/// In addition to the features of the <see cref="DateTime"/> class, the <see cref="iCalDateTime"/>
- /// class handles time zone differences, and integrates seamlessly into
- /// the iCalendar framework.
+ /// class handles time zone differences, and integrates seamlessly into the iCalendar framework.
/// </remarks>
/// </summary>
#if !SILVERLIGHT
@@ -66,6 +65,10 @@ public iCalDateTime(DateTime value, string tzid)
{
Initialize(value, tzid, null);
}
+ public iCalDateTime(DateTime value, TimeZoneObservance tzo)
+ {
+ Initialize(value, tzo);
+ }
public iCalDateTime(int year, int month, int day, int hour, int minute, int second)
{
Initialize(year, month, day, hour, minute, second, null, null);
@@ -110,6 +113,21 @@ private void Initialize(DateTime value, string tzid, IICalendar iCal)
this.AssociatedObject = iCal;
}
+ private void Initialize(DateTime value, TimeZoneObservance tzo)
+ {
+ if (value.Kind == DateTimeKind.Utc)
+ this.IsUniversalTime = true;
+
+ // Convert all incoming values to UTC.
+ this.Value = DateTime.SpecifyKind(value, DateTimeKind.Utc);
+ this.HasDate = true;
+ this.HasTime = (value.Second == 0 && value.Minute == 0 && value.Hour == 0) ? false : true;
+ if (tzo.TimeZoneInfo != null)
+ this.TZID = tzo.TimeZoneInfo.TZID;
+ this.TimeZoneObservance = tzo;
+ this.AssociatedObject = tzo.TimeZoneInfo;
+ }
+
private DateTime CoerceDateTime(int year, int month, int day, int hour, int minute, int second, DateTimeKind kind)
{
DateTime dt = DateTime.MinValue;
@@ -165,7 +183,6 @@ public override ICalendarObject AssociatedObject
if (!object.Equals(AssociatedObject, value))
{
base.AssociatedObject = value;
- _TimeZoneObservance = null;
}
}
}
@@ -209,16 +226,7 @@ public override int GetHashCode()
public override string ToString()
{
- string tz = TimeZoneName;
- if (!string.IsNullOrEmpty(tz))
- tz = " " + tz;
-
- if (HasTime && HasDate)
- return Value.ToString() + tz;
- else if (HasTime)
- return Value.TimeOfDay.ToString() + tz;
- else
- return Value.ToShortDateString() + tz;
+ return ToString(null, null);
}
#endregion
@@ -355,7 +363,7 @@ public DateTime UTC
}
/// <summary>
- /// Gets the <see cref="iCalTimeZoneInfo"/> object for the time
+ /// Gets/sets the <see cref="iCalTimeZoneInfo"/> object for the time
/// zone set by <see cref="TZID"/>.
/// </summary>
public TimeZoneObservance? TimeZoneObservance
@@ -367,6 +375,16 @@ public DateTime UTC
set
{
_TimeZoneObservance = value;
+ if (value != null &&
+ value.HasValue &&
+ value.Value.TimeZoneInfo != null)
+ {
+ this.TZID = value.Value.TimeZoneInfo.TZID;
+ }
+ else
+ {
+ this.TZID = null;
+ }
}
}
@@ -401,7 +419,7 @@ public DateTime Value
// fall within this time zone observance.
if (_TimeZoneObservance != null &&
_TimeZoneObservance.HasValue &&
- !_TimeZoneObservance.Value.Period.Contains(this))
+ !_TimeZoneObservance.Value.Contains(this))
_TimeZoneObservance = null;
}
@@ -428,7 +446,15 @@ public string TZID
if (!object.Equals(TZID, value))
{
Parameters.Set("TZID", value);
- _TimeZoneObservance = null;
+
+ // Set the time zone observance to null if the TZID
+ // doesn't match.
+ if (value != null &&
+ _TimeZoneObservance != null &&
+ _TimeZoneObservance.HasValue &&
+ _TimeZoneObservance.Value.TimeZoneInfo != null &&
+ !object.Equals(_TimeZoneObservance.Value.TimeZoneInfo.TZID, value))
+ _TimeZoneObservance = null;
}
}
}
@@ -488,7 +514,7 @@ public IDateTime FirstDayOfYear
get
{
IDateTime dt = Copy<IDateTime>();
- dt.Value = Value.AddDays(-Value.DayOfYear+1);
+ dt.Value = Value.AddDays(-Value.DayOfYear+1).Date;
return dt;
}
}
@@ -498,7 +524,7 @@ public IDateTime FirstDayOfMonth
get
{
IDateTime dt = Copy<IDateTime>();
- dt.Value = Value.AddDays(-Value.Day+1);
+ dt.Value = Value.AddDays(-Value.Day+1).Date;
return dt;
}
}
@@ -511,11 +537,29 @@ public DateTime Date
public TimeSpan TimeOfDay
{
get { return Value.TimeOfDay; }
- }
+ }
+
+ public IDateTime ToTimeZone(TimeZoneObservance tzo)
+ {
+ ITimeZoneInfo tzi = tzo.TimeZoneInfo;
+ if (tzi != null)
+ return new iCalDateTime(tzi.OffsetTo.ToLocal(UTC), tzo);
+ return null;
+ }
- public IDateTime ToTimeZone(ITimeZoneInfo tzi)
+ public IDateTime ToTimeZone(ITimeZone tz)
{
- return new iCalDateTime(tzi.OffsetTo.ToLocal(UTC));
+ if (tz != null)
+ {
+ TimeZoneObservance? tzi = tz.GetTimeZoneObservance(this);
+ if (tzi != null && tzi.HasValue)
+ return ToTimeZone(tzi.Value);
+
+ // FIXME: if the time cannot be resolved, should we
+ // just provide a copy? Is this always appropriate?
+ return Copy<IDateTime>();
+ }
+ else throw new ArgumentException("You must provide a valid time zone to the ToTimeZone() method", "tz");
}
public IDateTime ToTimeZone(string tzid)
@@ -526,15 +570,11 @@ public IDateTime ToTimeZone(string tzid)
{
ITimeZone tz = Calendar.GetTimeZone(tzid);
if (tz != null)
- {
- TimeZoneObservance? tzi = tz.GetTimeZoneObservance(this);
- if (tzi != null && tzi.HasValue)
- return ToTimeZone(tzi.Value.TimeZoneInfo);
- }
+ return ToTimeZone(tz);
+
// FIXME: sometimes a calendar is perfectly valid but the time zone
// could not be resolved. What should we do here?
//throw new Exception("The '" + tzid + "' time zone could not be resolved.");
-
return Copy<IDateTime>();
}
else throw new Exception("The iCalDateTime object must have an iCalendar associated with it in order to use TimeZones.");
@@ -542,6 +582,13 @@ public IDateTime ToTimeZone(string tzid)
else throw new ArgumentException("You must provide a valid TZID to the ToTimeZone() method", "tzid");
}
+ public IDateTime SetTimeZone(ITimeZone tz)
+ {
+ if (tz != null)
+ this.TZID = tz.TZID;
+ return this;
+ }
+
public IDateTime Add(TimeSpan ts)
{
return this + ts;
@@ -693,7 +740,18 @@ public string ToString(string format)
public string ToString(string format, IFormatProvider formatProvider)
{
- return Value.ToString(format, formatProvider);
+ string tz = TimeZoneName;
+ if (!string.IsNullOrEmpty(tz))
+ tz = " " + tz;
+
+ if (format != null)
+ return Value.ToString(format, formatProvider) + tz;
+ else if (HasTime && HasDate)
+ return Value.ToString() + tz;
+ else if (HasTime)
+ return Value.TimeOfDay.ToString() + tz;
+ else
+ return Value.ToShortDateString() + tz;
}
#endregion
View
2  DDay.iCal/Evaluation/RecurrencePatternEvaluator.cs
@@ -235,7 +235,7 @@ private List<DateTime> GetDates(IDateTime seed, DateTime periodStart, DateTime p
IncrementDate(ref incremented, pattern, pattern.Interval);
}
}
-
+
bool?[] expandBehavior = RecurrenceUtil.GetExpandBehaviorList(pattern);
int invalidCandidateCount = 0;
View
4 DDay.iCal/Evaluation/TimeZoneEvaluator.cs
@@ -89,6 +89,10 @@ public override void Clear()
public override IList<IPeriod> Evaluate(IDateTime referenceDate, DateTime periodStart, DateTime periodEnd, bool includeReferenceDateInResults)
{
+ // Ensure the reference date is associated with the time zone
+ if (referenceDate.AssociatedObject == null)
+ referenceDate.AssociatedObject = TimeZone;
+
List<ITimeZoneInfo> infos = new List<ITimeZoneInfo>(TimeZone.TimeZoneInfos);
// Evaluate extra time periods, without re-evaluating ones that were already evaluated
View
10 DDay.iCal/General/CalendarPropertyList.cs
@@ -36,7 +36,13 @@ public CalendarPropertyList(ICalendarObject parent, bool caseInsensitive)
}
#endregion
+
+ #region Overrides
+
+
+ #endregion
+
#region Event Handlers
void CalendarPropertyList_ItemRemoved(object sender, ObjectEventArgs<ICalendarProperty> e)
@@ -59,12 +65,12 @@ virtual public void Set(string name, object value)
{
name = m_CaseInsensitive ? name.ToUpper() : name;
if (value != null)
- {
+ {
ICalendarProperty p = new CalendarProperty(name, value);
if (ContainsKey(name))
this[name] = p;
else
- Add(p);
+ Add(p);
}
else
{
View
6 DDay.iCal/Interfaces/DataTypes/IDateTime.cs
@@ -133,13 +133,15 @@ public interface IDateTime :
/// Converts the date/time value to a local time
/// within the specified time zone.
/// </summary>
- IDateTime ToTimeZone(ITimeZoneInfo tzi);
+ IDateTime ToTimeZone(TimeZoneObservance tzo);
/// <summary>
/// Converts the date/time value to a local time
/// within the specified time zone.
/// </summary>
IDateTime ToTimeZone(string tzid);
+ IDateTime ToTimeZone(ITimeZone tz);
+ IDateTime SetTimeZone(ITimeZone tz);
IDateTime Add(TimeSpan ts);
IDateTime Subtract(TimeSpan ts);
@@ -160,6 +162,6 @@ public interface IDateTime :
bool GreaterThanOrEqual(IDateTime dt);
string ToString(string format);
- void AssociateWith(IDateTime dt);
+ void AssociateWith(IDateTime dt);
}
}
View
4 DDay.iCal/Properties/AssemblyInfo.cs.template
@@ -31,5 +31,5 @@ using System.Security;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("1.0.1.$WCREV$")]
-[assembly: AssemblyFileVersion("1.0.1.$WCREV$")]
+[assembly: AssemblyVersion("1.0.2.$WCREV$")]
+[assembly: AssemblyFileVersion("1.0.2.$WCREV$")]
View
5 DDay.iCal/Utility/DateUtil.cs
@@ -58,11 +58,8 @@ public static IDateTime MatchTimeZone(IDateTime dt1, IDateTime dt2)
// same context (i.e. evaluation).
if (dt1.TZID != null)
{
- ITimeZoneInfo tzi = dt1.TimeZoneObservance != null ?
- dt1.TimeZoneObservance.Value.TimeZoneInfo :
- null;
if (!string.Equals(dt1.TZID, copy.TZID))
- return (tzi != null) ? copy.ToTimeZone(tzi) : copy.ToTimeZone(dt1.TZID);
+ return (dt1.TimeZoneObservance != null) ? copy.ToTimeZone(dt1.TimeZoneObservance.Value) : copy.ToTimeZone(dt1.TZID);
else return copy;
}
else if (dt1.IsUniversalTime)
View
10 DDay.iCal/Utility/RecurrenceUtil.cs
@@ -29,13 +29,17 @@ static public IList<Occurrence> GetOccurrences(IRecurrable recurrable, IDateTime
IEvaluator evaluator = recurrable.GetService(typeof(IEvaluator)) as IEvaluator;
if (evaluator != null)
{
+ // Ensure the start time is associated with the object being queried
+ IDateTime start = recurrable.Start.Copy<IDateTime>();
+ start.AssociatedObject = recurrable as ICalendarObject;
+
// Change the time zone of periodStart/periodEnd as needed
// so they can be used during the evaluation process.
- periodStart = DateUtil.MatchTimeZone(recurrable.Start, periodStart);
- periodEnd = DateUtil.MatchTimeZone(recurrable.Start, periodEnd);
+ periodStart = DateUtil.MatchTimeZone(start, periodStart);
+ periodEnd = DateUtil.MatchTimeZone(start, periodEnd);
IList<IPeriod> periods = evaluator.Evaluate(
- recurrable.Start,
+ start,
DateUtil.GetSimpleDateTimeData(periodStart),
DateUtil.GetSimpleDateTimeData(periodEnd),
includeReferenceDateInResults);
View
8 Examples/C#/Example1/Example1.csproj
@@ -1,4 +1,4 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -9,6 +9,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Example1</RootNamespace>
<AssemblyName>Example1</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>2.0</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -62,6 +67,7 @@
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
+ <DesignTime>True</DesignTime>
</Compile>
<None Include="Calendars\Barça 2006 - 2007.ics">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
View
4 Examples/C#/Example1/Example1.sln
@@ -1,6 +1,6 @@

-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Example1", "Example1.csproj", "{84474495-BC39-4336-A2D6-428044984C9E}"
EndProject
Global
View
44 Examples/C#/Example1/Properties/Resources.Designer.cs
@@ -1,17 +1,17 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.42
+// Runtime Version:2.0.50727.4206
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
-namespace Example1.Properties
-{
-
-
+namespace Example1.Properties {
+ using System;
+
+
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
@@ -22,48 +22,40 @@ namespace Example1.Properties
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
+ internal class Resources {
+
private static global::System.Resources.ResourceManager resourceMan;
-
+
private static global::System.Globalization.CultureInfo resourceCulture;
-
+
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
+ internal Resources() {
}
-
+
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Example1.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
-
+
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
return resourceCulture;
}
- set
- {
+ set {
resourceCulture = value;
}
}
View
24 Examples/C#/Example1/Properties/Settings.Designer.cs
@@ -1,28 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.42
+// Runtime Version:2.0.50727.4206
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
-namespace Example1.Properties
-{
-
-
+namespace Example1.Properties {
+
+
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
+
+ public static Settings Default {
+ get {
return defaultInstance;
}
}
View
7 Examples/C#/Example2/Example2.csproj
@@ -1,4 +1,4 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -9,6 +9,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Example2</RootNamespace>
<AssemblyName>Example2</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>2.0</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
View
4 Examples/C#/Example2/Example2.sln
@@ -1,6 +1,6 @@

-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Example2", "Example2.csproj", "{AA687267-0244-484A-A3D7-0AC6CB9B6ADD}"
EndProject
Global
View
BIN  Examples/C#/Example5/Bin/DDay.iCal.dll
Binary file not shown
View
7 Examples/C#/Example5/Example5.sln
@@ -1,8 +1,9 @@

-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "C:\...\Example5\", ".", "{F282C4FE-2A34-4C2B-81DD-16AD59BF4613}"
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Example5", ".", "{F282C4FE-2A34-4C2B-81DD-16AD59BF4613}"
ProjectSection(WebsiteProperties) = preProject
+ TargetFramework = "3.5"
ProjectReferences = ""
Debug.AspNetCompiler.VirtualPath = "/Example5"
Debug.AspNetCompiler.PhysicalPath = "..\..\SourceForge\DDay.iCal\trunk\Example5\"
View
59 Examples/C#/Example5/Web.Config
@@ -8,7 +8,15 @@
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
- <appSettings/>
+ <configSections>
+ <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
+ <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
+ <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
+ <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
+ <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
+ <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
+ <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
+ <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/></sectionGroup></sectionGroup></sectionGroup></configSections><appSettings/>
<connectionStrings/>
<system.web>
<!--
@@ -19,7 +27,11 @@
-->
<compilation debug="true">
<assemblies>
- <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>
+ <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
+ <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
+ <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
+ <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
@@ -38,5 +50,44 @@
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
- </system.web>
-</configuration>
+ <pages>
+ <controls>
+ <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></controls></pages>
+ <httpHandlers>
+ <remove verb="*" path="*.asmx"/>
+ <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpHandlers>
+ <httpModules>
+ <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpModules></system.web>
+ <system.codedom>
+ <compilers>
+ <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
+ <providerOption name="CompilerVersion" value="v3.5"/>
+ <providerOption name="WarnAsError" value="false"/></compiler>
+ <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
+ <providerOption name="CompilerVersion" value="v3.5"/>
+ <providerOption name="OptionInfer" value="true"/>
+ <providerOption name="WarnAsError" value="false"/></compiler></compilers></system.codedom>
+ <system.webServer>
+ <validation validateIntegratedModeConfiguration="false"/>
+ <modules>
+ <remove name="ScriptModule"/>
+ <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></modules>
+ <handlers>
+ <remove name="WebServiceHandlerFactory-Integrated"/>
+ <remove name="ScriptHandlerFactory"/>
+ <remove name="ScriptHandlerFactoryAppServices"/>
+ <remove name="ScriptResource"/>
+ <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></handlers></system.webServer>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
+ <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
+ <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly></assemblyBinding></runtime></configuration>
View
7 Examples/C#/Example6/Example6.csproj
@@ -1,4 +1,4 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -9,6 +9,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Example6</RootNamespace>
<AssemblyName>Example6</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>2.0</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
View
4 Examples/C#/Example6/Example6.sln
@@ -1,6 +1,6 @@

-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Example6", "Example6.csproj", "{A4B74547-448F-4672-8BC5-E07B85D5D239}"
EndProject
Global
Please sign in to comment.
Something went wrong with that request. Please try again.