Giter Site home page Giter Site logo

fast-member's People

Watchers

 avatar

fast-member's Issues

ArgumentOutOfRangeException when accessing private Enum

What steps will reproduce the problem?
1.
This enum:
----------
public enum EnumA
{
    One,
    Two,
    Three
}

This class:
-----------
public class ClassD
{
    private EnumA _foo;

    public void SetFoo(EnumA foo)
    {
        _foo = foo;
    }

    public EnumA GetFoo()
    {
        return _foo;
    }
}

This test:
----------
[Test]
public void Cant_deserialize_enum()
{
    var value = new ClassD();
    value.SetFoo(EnumA.One);
    var accessor = TypeAccessor.Create(typeof(ClassD));
    var accessed = accessor[value, "_foo"];
    var foo = (EnumA)accessed;
}

What is the expected output? What do you see instead?
It should deserialize--flipping _foo to a public field shows correct behavior, 
private results in ArgumentOutOfRangeException 


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by daniel.crenna on 6 Apr 2014 at 4:40

Caching of property and field names

I have a clone in which I've added caching of property and field names.  Not 
sure if this is of any interest, but it's here if you want:

http://code.google.com/r/kearonsean-fast-member/source/detail?r=6488edf35577a727
1a39472e72654650b36e627e

Original issue reported on code.google.com by [email protected] on 13 May 2012 at 10:48

Assembly is not strongly signed

The FastMember.dll assembly is not strongly signed.

Original issue reported on code.google.com by pvginkel on 29 Jan 2012 at 7:12

Feature 'namespace alias qualifier' cannot be used because it is not part of the ISO-1 C# language specifications.

What steps will reproduce the problem?
1. hg clone https://code.google.com/p/fast-member/ 
2. cd fast-member
3. C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe .\FastMember.sln

What is the expected output? What do you see instead?
Build Successful ( this _did_ work initially when the project was released last 
night. this is on a different machine )

What version of the product are you using? On what operating system?
head 1.0.0.2 i believe

Please provide any additional information below.
VS2010 on a Win7 x64 machine.

Original issue reported on code.google.com by [email protected] on 13 Jan 2012 at 11:44

Nicer error message when ArgumentOutOfRangeException exceptions are thrown

If you change the code from 

il.Emit(OpCodes.Ldstr, "name");
il.Emit(OpCodes.Newobj, typeof(ArgumentOutOfRangeException).GetConstructor(new 
Type[] { typeof(string) }));
il.Emit(OpCodes.Throw);

To this:

il.Emit(OpCodes.Ldarg, 2);
il.Emit(OpCodes.Newobj, typeof(ArgumentOutOfRangeException).GetConstructor(new 
Type[] { typeof(string) }));
il.Emit(OpCodes.Throw);

It'll shown you the actual Argument name that is causing the issue, at the 
moment it just says the parameter name is "name"

This could be changed here 
http://code.google.com/p/fast-member/source/browse/FastMember/TypeAccessor.cs#11
3 and 
http://code.google.com/p/fast-member/source/browse/FastMember/TypeAccessor.cs#16
8 and 

Original issue reported on code.google.com by [email protected] on 2 May 2012 at 5:00

allowNonPublicAccessors does not work with ObjectAccessor

Here is your code
As you can see allowNonPublicAccessors is not used

    /// <summary>
    /// Wraps an individual object, allowing by-name access to that instance
    /// 
    /// </summary>
    public static ObjectAccessor Create(object target, bool allowNonPublicAccessors)
    {
      if (target == null)
        throw new ArgumentNullException("target");
      IDynamicMetaObjectProvider target1 = target as IDynamicMetaObjectProvider;
      if (target1 != null)
        return (ObjectAccessor) new ObjectAccessor.DynamicWrapper(target1);
      else
        return (ObjectAccessor) new ObjectAccessor.TypeAccessorWrapper(target, TypeAccessor.Create(target.GetType()));
    }

Original issue reported on code.google.com by [email protected] on 28 Nov 2014 at 3:20

Compiler directive mismatch for NET20 vs NO_DYNAMIC

What steps will reproduce the problem?
1. Set starting project of solution to FastMember_Net35
2. Do a build / compile
3. It will complain about System.Dynamic not found

2 possible workaround / solution for this:
Either:
Change Conditional Compilation symbols from NET20 to NO_DYNAMIC

-or-
Change compiler directives in codes from:
#if !NO_DYNAMIC
...
#endif

to:
#if !NET20
...
#endif

Original issue reported on code.google.com by [email protected] on 30 Apr 2012 at 12:36

TypeAccessor.WriteSetter throws exception, if property setter is not public

The method TypeAccessor.WriteSetter throws an ArgumentNullException, if the 
target type has a property with a non-public setter. (Line 141: 
http://code.google.com/p/fast-member/source/browse/FastMember/TypeAccessor.cs#14
1)

Example:
class TestTarget
{
    public int Id { get; private set; }
}


I am not sure why `prop.GetSetMethod()` returns `null`, although 
`prop.CanWrite` obviously returned `true` in line 129.

Original issue reported on code.google.com by [email protected] on 27 Jan 2012 at 8:22

Provide results of reflection PropertyInfo / FieldInfo in TypeAccessor

It would be nice to be able to pull out the PropertyInfo / FieldInfo array 
results created when the accessor is created. In my use case, I need to build 
TypeAccessors off of anonymous types that "look" like the real typed 
counterpart. In these cases I only want to know what properties in the 
anonymous type match the static type (to avoid crashing on a bad get). I've 
patched my version to provide these results so I don't have to take another 
reflection hit outside of the library to do the same thing, but it might be 
worth adding for everyone. Not worth a patch, it's just trivially exposing 
"props" and "fields" as instance properties.


Original issue reported on code.google.com by daniel.crenna on 24 Oct 2012 at 8:06

Access to static properties and fields

How can we make ti working with static properties?

Here is a sample to product problem:
var accessor = TypeAccessor.Create(typeof (DateTime));
var now = accessor[null, "Now"];

Regards,

Original issue reported on code.google.com by [email protected] on 20 Nov 2014 at 10:50

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.