Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/11/09 17:25:40 (15 years ago)
Author:
epitzer
Message:

replace Functional with Linq

Location:
branches/New Persistence Exploration/Persistence/Persistence
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/New Persistence Exploration/Persistence/Persistence/Persistence.csproj

    r1323 r1324  
    4242  <ItemGroup>
    4343    <Reference Include="System" />
     44    <Reference Include="System.Core">
     45      <RequiredTargetFramework>3.5</RequiredTargetFramework>
     46    </Reference>
    4447    <Reference Include="System.Data" />
    45     <Reference Include="System.Data.Linq">
     48    <Reference Include="System.Data.DataSetExtensions">
    4649      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    4750    </Reference>
  • branches/New Persistence Exploration/Persistence/Persistence/StorableAttribute.cs

    r1323 r1324  
    22using System.Collections.Generic;
    33using System.Reflection;
     4using System.Linq;
    45
    56namespace Persistence {
     
    134135      }
    135136      object method(object obj, Dictionary<object, object> twins) {
    136         return serializer.DeSerialize(         
    137           Functional.Map(
    138             serializer.Serialize(obj),
    139             o => factory.Clone(o, twins)),
    140           type);
     137        return serializer.DeSerialize(
     138          serializer.Serialize(obj)
     139          .OfType<object>()
     140          .Select(o => factory.Clone(o, twins)),
     141          type);         
    141142      }
    142143    }
  • branches/New Persistence Exploration/Persistence/Persistence/Util.cs

    r1321 r1324  
    55using System.Collections;
    66
    7 namespace Persistence {
    8   public class Functional {
    9 
    10     public delegate object Mapper(object x);
    11 
    12     public static IEnumerable Map(IEnumerable enumeration, Mapper m) {
    13       foreach (object t in enumeration) {
    14         yield return m(t);
    15       }
    16     }
    17 
    18   }
     7namespace Persistence { 
    198  public class InterfaceInstantiatior {
    209    public static List<T> InstantiateAll<T>() {
Note: See TracChangeset for help on using the changeset viewer.