Permalink
Browse files

Added missing silverlight interface, added serialization to fluent re…

…gex.

Moved support classes to separate namespace
  • Loading branch information...
jayt
jayt committed Aug 2, 2012
1 parent b782dde commit 9ddf02105638aeabbeef05556a769cacf70551a3
Showing with 81 additions and 26 deletions.
  1. +2 −2 ImpromptuInterface.MVVM/Properties/AssemblyInfo.cs
  2. +1 −0 ImpromptuInterface.MVVM/src/ImpromptuBindingList.cs
  3. +1 −0 ImpromptuInterface.MVVM/src/ImpromptuRelayCommand.cs
  4. +1 −0 ImpromptuInterface.MVVM/src/ImpromptuViewModel.cs
  5. +3 −1 ImpromptuInterface.Silverlight/ImpromptuInterface (Silverlight).csproj
  6. +3 −3 ImpromptuInterface.Silverlight5/ImpromptuInterface (Silverlight5).csproj
  7. +1 −0 ImpromptuInterface/ImpromptuInterface.csproj
  8. +2 −2 ImpromptuInterface/Properties/AssemblyInfo.cs
  9. +1 −0 ImpromptuInterface/src/Dynamic/CacheableInvocation.cs
  10. +1 −0 ImpromptuInterface/src/Dynamic/ImpromptuDictionary.cs
  11. +1 −0 ImpromptuInterface/src/Dynamic/ImpromptuDictionaryBase.cs
  12. +1 −0 ImpromptuInterface/src/Dynamic/ImpromptuDummy.cs
  13. +1 −0 ImpromptuInterface/src/Dynamic/ImpromptuForwarder.cs
  14. +1 −0 ImpromptuInterface/src/Dynamic/ImpromptuGet.cs
  15. +1 −0 ImpromptuInterface/src/Dynamic/ImpromptuLateLibraryType.cs
  16. +1 −0 ImpromptuInterface/src/Dynamic/ImpromptuLazy.cs
  17. +1 −0 ImpromptuInterface/src/Dynamic/ImpromptuList.cs
  18. +27 −0 ImpromptuInterface/src/Dynamic/ImpromptuMatch.cs
  19. +3 −2 ImpromptuInterface/src/Dynamic/ImpromptuObject.cs
  20. +1 −0 ImpromptuInterface/src/Dynamic/ImpromptuRecorder.cs
  21. +1 −0 ImpromptuInterface/src/Dynamic/Invocation.cs
  22. +1 −0 ImpromptuInterface/src/EmitProxy/ActLikeProxy.cs
  23. +1 −0 ImpromptuInterface/src/EmitProxy/ActLikeProxyAttribute.cs
  24. +1 −0 ImpromptuInterface/src/EmitProxy/BuildProxy.cs
  25. +18 −13 {ImpromptuInterface.Silverlight/src → ImpromptuInterface/src/Internal}/Support.cs
  26. +1 −0 ImpromptuInterface/src/InvokeArg.cs
  27. +1 −0 ImpromptuInterface/src/InvokeContext.cs
  28. +1 −1 NuGetBuild/Core/ImpromptuInterface.MetaData.xml
  29. +2 −2 NuGetBuild/MVVM/ImpromptuInterface.MVVM.MetaData.xml
@@ -42,7 +42,7 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
#if SILVERLIGHT
-[assembly: AssemblyVersion("4.0.1.1")]
+[assembly: AssemblyVersion("4.0.2.0")]
#else
-[assembly: AssemblyVersion("4.0.1.*")]
+[assembly: AssemblyVersion("4.0.2.*")]
#endif
@@ -22,6 +22,7 @@
using System.Text;
using ImpromptuInterface.Dynamic;
using Microsoft.CSharp.RuntimeBinder;
+using ImpromptuInterface.Internal.Support;
namespace ImpromptuInterface.MVVM
{
@@ -24,6 +24,7 @@
using ImpromptuInterface;
using ImpromptuInterface.Dynamic;
using Microsoft.CSharp.RuntimeBinder;
+using ImpromptuInterface.Internal.Support;
namespace ImpromptuInterface.MVVM
{
@@ -24,6 +24,7 @@
using ImpromptuInterface.Dynamic;
using ImpromptuInterface.Optimization;
using ImpromptuInterface.MVVM;
+using ImpromptuInterface.Internal.Support;
namespace ImpromptuInterface.MVVM
{
@@ -199,6 +199,9 @@
<Compile Include="..\ImpromptuInterface\src\Internal\InvokeSetters.cs">
<Link>src\Internal\InvokeSetters.cs</Link>
</Compile>
+ <Compile Include="..\ImpromptuInterface\src\Internal\Support.cs">
+ <Link>src\Internal\Support.cs</Link>
+ </Compile>
<Compile Include="..\ImpromptuInterface\src\InvokeArg.cs">
<Link>src\InvokeArg.cs</Link>
</Compile>
@@ -227,7 +230,6 @@
<Link>src\Optimization\Util.cs</Link>
</Compile>
<Compile Include="src\Optimization\SilverlightConverter.cs" />
- <Compile Include="src\Support.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
@@ -68,9 +68,6 @@
<Compile Include="..\ImpromptuInterface.Silverlight\src\Optimization\SilverlightConverter.cs">
<Link>src\Optimization\SilverlightConverter.cs</Link>
</Compile>
- <Compile Include="..\ImpromptuInterface.Silverlight\src\Support.cs">
- <Link>src\Support.cs</Link>
- </Compile>
<Compile Include="..\ImpromptuInterface\Properties\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
@@ -182,6 +179,9 @@
<Compile Include="..\ImpromptuInterface\src\Internal\InvokeSetters.cs">
<Link>src\Internal\InvokeSetters.cs</Link>
</Compile>
+ <Compile Include="..\ImpromptuInterface\src\Internal\Support.cs">
+ <Link>src\Internal\Support.cs</Link>
+ </Compile>
<Compile Include="..\ImpromptuInterface\src\InvokeArg.cs">
<Link>src\InvokeArg.cs</Link>
</Compile>
@@ -153,6 +153,7 @@
<Compile Include="src\Impromptu.cs" />
<Compile Include="src\Internal\Curry.cs" />
<Compile Include="src\Internal\InvokeSetters.cs" />
+ <Compile Include="src\Internal\Support.cs" />
<Compile Include="src\InvokeArg.cs" />
<Compile Include="src\InvokeContext.cs" />
<Compile Include="src\InvokeExt\InvokeExt.cs" />
@@ -59,10 +59,10 @@
#if SILVERLIGHT
-[assembly: AssemblyVersion("6.0.1.0")]
+[assembly: AssemblyVersion("6.0.2.0")]
#else
-[assembly: AssemblyVersion("6.0.1.*")]
+[assembly: AssemblyVersion("6.0.2.*")]
#endif
@@ -2,6 +2,7 @@
using System.Dynamic;
using System.Linq;
using System.Runtime.CompilerServices;
+using ImpromptuInterface.Internal.Support;
using ImpromptuInterface.Optimization;
using Microsoft.CSharp.RuntimeBinder;
@@ -21,6 +21,7 @@
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
+using ImpromptuInterface.Internal.Support;
namespace ImpromptuInterface.Dynamic
{
@@ -21,6 +21,7 @@
using System.Reflection;
using System.Runtime.Serialization;
using System.Threading;
+using ImpromptuInterface.Internal.Support;
using ImpromptuInterface.Optimization;
using Microsoft.CSharp.RuntimeBinder;
@@ -3,6 +3,7 @@
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
+using ImpromptuInterface.Internal.Support;
using ImpromptuInterface.Optimization;
namespace ImpromptuInterface.Dynamic
@@ -20,6 +20,7 @@
using System.Reflection;
using System.Runtime.Serialization;
using System.Text;
+using ImpromptuInterface.Internal.Support;
using Microsoft.CSharp;
using Microsoft.CSharp.RuntimeBinder;
using ImpromptuInterface.Optimization;
@@ -18,6 +18,7 @@
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
+using ImpromptuInterface.Internal.Support;
using ImpromptuInterface.Optimization;
using Microsoft.CSharp.RuntimeBinder;
@@ -4,6 +4,7 @@
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
+using ImpromptuInterface.Internal.Support;
using ImpromptuInterface.Optimization;
namespace ImpromptuInterface.Dynamic
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
+using ImpromptuInterface.Internal.Support;
namespace ImpromptuInterface.Dynamic
{
@@ -21,6 +21,7 @@
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.Serialization;
+using ImpromptuInterface.Internal.Support;
using ImpromptuInterface.Optimization;
using Microsoft.CSharp.RuntimeBinder;
@@ -1,8 +1,12 @@
using System;
using System.Dynamic;
using System.Linq;
+using System.Runtime.Serialization;
using System.Text.RegularExpressions;
using System.Collections.Generic;
+using ImpromptuInterface.Internal.Support;
+using ImpromptuInterface.Optimization;
+
namespace ImpromptuInterface.Dynamic
{
@@ -11,6 +15,7 @@ public interface IFluentMatch
string Value { get;}
}
+ [Serializable]
public class ImpromptuMatch : ImpromptuObject, IFluentMatch
{
private readonly Match _match;
@@ -21,6 +26,28 @@ public ImpromptuMatch(Match match, Regex regex =null)
_regex = regex;
}
+#if !SILVERLIGHT
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ImpromptuList"/> class.
+ /// </summary>
+ /// <param name="info">The info.</param>
+ /// <param name="context">The context.</param>
+ protected ImpromptuMatch(SerializationInfo info,
+ StreamingContext context):base(info,context)
+ {
+ _match = info.GetValue<Match>("_match");
+ _regex = info.GetValue<Regex>("_regex");
+ }
+
+ public override void GetObjectData(SerializationInfo info, StreamingContext context)
+ {
+
+ base.GetObjectData(info,context);
+ info.AddValue("_match", _match);
+ info.AddValue("_regex", _regex);
+ }
+#endif
+
public override IEnumerable<string> GetDynamicMemberNames()
{
if (_regex == null)
@@ -19,7 +19,8 @@
using System.Linq;
using System.Runtime.Serialization;
using ImpromptuInterface.Build;
-using ImpromptuInterface.Optimization;
+using ImpromptuInterface.Internal.Support;
+using System.Reflection;
namespace ImpromptuInterface.Dynamic
{
/// <summary>
@@ -28,7 +29,7 @@ namespace ImpromptuInterface.Dynamic
/// </summary>
[Serializable]
- public abstract class ImpromptuObject : DynamicObject, IDynamicKnowLike, IActLike,ISerializable
+ public abstract class ImpromptuObject : DynamicObject, IDynamicKnowLike, IActLike,ISerializable,ICustomTypeProvider
{
/// <summary>
/// Initializes a new instance of the <see cref="ImpromptuObject"/> class.
@@ -20,6 +20,7 @@
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
+using ImpromptuInterface.Internal.Support;
using ImpromptuInterface.Optimization;
namespace ImpromptuInterface.Dynamic
@@ -16,6 +16,7 @@
using System;
using System.Linq;
+using ImpromptuInterface.Internal.Support;
using Microsoft.CSharp.RuntimeBinder;
namespace ImpromptuInterface.Dynamic
@@ -19,6 +19,7 @@
using System.Runtime.Serialization;
using ImpromptuInterface;
using ImpromptuInterface.Dynamic;
+using ImpromptuInterface.Internal.Support;
using ImpromptuInterface.Optimization;
namespace ImpromptuInterface.Build
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using ImpromptuInterface.Internal.Support;
namespace ImpromptuInterface.Build
{
@@ -17,6 +17,7 @@
using System.Collections.ObjectModel;
using System.Linq.Expressions;
using ImpromptuInterface.Dynamic;
+using ImpromptuInterface.Internal.Support;
using ImpromptuInterface.Optimization;
namespace ImpromptuInterface.Build
@@ -1,17 +1,21 @@
using System;
using System.Collections;
-using System.Net;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Documents;
-using System.Windows.Ink;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Shapes;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
-namespace ImpromptuInterface
+namespace ImpromptuInterface.Internal.Support
{
+
+#if !SILVERLIGHT5
+
+ public interface ICustomTypeProvider
+ {
+
+ }
+
+#endif
+
#if SILVERLIGHT
/// <summary>
/// Added for silverlight compile time compatability
@@ -27,16 +31,16 @@ public sealed class NonSerialized : Attribute
/// <summary>
/// Added for silverlight compile time compatability
/// </summary>
- public interface IObjectReference {}
+ public interface IObjectReference { }
/// <summary>
/// Added for silverlight compile time compatability
/// </summary>
- public interface ISerializable {}
+ public interface ISerializable { }
/// <summary>
/// Added for silverlight compile time compatability
/// </summary>
public interface ITypedList { }
-#endif
+
/// <summary>
/// Added for silverlight compile time compatability
@@ -75,4 +79,5 @@ public int GetHashCode(Object obj)
return tObj != null ? tObj.GetHashCode(this) : obj.GetHashCode();
}
}
+#endif
}
@@ -18,6 +18,7 @@
using System.Linq;
using System.Text;
using ImpromptuInterface.Dynamic;
+using ImpromptuInterface.Internal.Support;
namespace ImpromptuInterface
{
@@ -19,6 +19,7 @@
using System.Linq;
using System.Text;
using ImpromptuInterface.Dynamic;
+using ImpromptuInterface.Internal.Support;
namespace ImpromptuInterface
{
@@ -1,6 +1,6 @@
<metadata>
<id>ImpromptuInterface</id>
- <version>6.0.1</version>
+ <version>6.0.2</version>
<authors>Jay Tuley</authors>
<owners>Jay Tuley</owners>
<description>A Lightweight Duck Casting Framework for dynamic C# 4.0 (.net4 &amp; silverlight4). Includes helper methods for dynamic invocation via method and property names known only at runtime (runs faster than reflection).</description>
@@ -1,6 +1,6 @@
<metadata>
<id>ImpromptuInterface.MVVM</id>
- <version>4.0.1-beta</version>
+ <version>4.0.2-beta</version>
<authors>Jay Tuley</authors>
<owners>Jay Tuley</owners>
<description>A Lightweight Dynamic MVVM View Model(.net4 &amp; silverlight4). Removes boilerplate code for MVVM, makes it practical to use MVVM in small apps.</description>
@@ -13,6 +13,6 @@
<frameworkAssembly assemblyName="Microsoft.CSharp" />
</frameworkAssemblies>
<dependencies>
- <dependency id="ImpromptuInterface" version="6.0.0" />
+ <dependency id="ImpromptuInterface" version="6.0.2" />
</dependencies>
</metadata>

0 comments on commit 9ddf021

Please sign in to comment.