That said...

The cast is a unary which has higher precedence from a coalescing one, so it 
ought to be get{ return knownTypes as IXmlKnownTypeMap ?? this }

Otherwise you'd be attempting to cast a null value. I'm not sure if that's 
considered unverifiable code from partial callers?
________________________________________
From: [email protected] 
[[email protected]] on behalf of hammett [[email protected]]
Sent: 06 January 2012 20:21
To: [email protected]
Subject: Re: DictionaryAdapter: Operation could destabilize the runtime

Go figure...

On Fri, Jan 6, 2012 at 12:09 PM, Craig Neuwirt <[email protected]> wrote:
> The cast is the only thing that could seem to affect the runtime verification 
> so I took it out by chance
> and it surprisingly worked.  I am sure there is a more scientific reason it 
> worked :-)
>
> On Jan 6, 2012, at 2:03 PM, hammett wrote:
>
>> How did you figured this out?
>>
>> On Fri, Jan 6, 2012 at 11:56 AM, Craig Neuwirt <[email protected]> wrote:
>>>
>>> Replacing
>>>
>>>        protected IXmlKnownTypeMap KnownTypes
>>>        {
>>>                get { return (IXmlKnownTypeMap) knownTypes ?? this; }
>>>        }
>>>
>>> with
>>>
>>>        protected IXmlKnownTypeMap KnownTypes
>>>        {
>>>                get
>>>                {
>>>                        if (knownTypes != null)
>>>                                return knownTypes;
>>>                        return this;
>>>                }
>>>        }
>>>
>>> removed the exceptions, but that doesn't make sense to me.  knowTypes and 
>>> this are statically known to be an IXmlKnownTypeMap
>>> so it looks very much like a runtime foobar to me.
>>>
>>> I committed the fix BTW
>>> -craig
>>>
>>> On Jan 6, 2012, at 12:24 PM, hammett wrote:
>>>
>>>> As soon as I add APTCA to Castle.Core, which is kinda needed. I get
>>>> this exception hundred of times. Quoting just one of them:
>>>>
>>>> 1>EXEC : 143) Test error :
>>>> Castle.Components.DictionaryAdapter.Xml.Tests.XmlTypeBehaviorT
>>>>  estCase+DerivedComponent.DerivedComponentInDifferentNameSpace
>>>> [C:\dev\castle\Core\build
>>>>  scripts\Build.proj]
>>>>       System.Security.VerificationException : Operation could
>>>> destabilize the runtime.
>>>>       at 
>>>> Castle.Components.DictionaryAdapter.Xml.XmlNodeAccessor.get_KnownTypes()
>>>> in C:\
>>>>    
>>>> dev\castle\Core\src\Castle.Core\Components.DictionaryAdapter\Xml\Internal\Accessors\X
>>>>    mlNodeAccessor.cs:line 56
>>>>
>>>>
>>>> Any clues?
>>>>
>>>> --
>>>> Cheers,
>>>> hammett
>>>> http://hammett.castleproject.org/
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "Castle Project Development List" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to 
>>>> [email protected].
>>>> For more options, visit this group at 
>>>> http://groups.google.com/group/castle-project-devel?hl=en.
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Castle Project Development List" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to 
>>> [email protected].
>>> For more options, visit this group at 
>>> http://groups.google.com/group/castle-project-devel?hl=en.
>>>
>>
>>
>>
>> --
>> Cheers,
>> hammett
>> http://hammett.castleproject.org/
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Castle Project Development List" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to 
>> [email protected].
>> For more options, visit this group at 
>> http://groups.google.com/group/castle-project-devel?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Castle Project Development List" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/castle-project-devel?hl=en.
>



--
Cheers,
hammett
http://hammett.castleproject.org/

--
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-devel?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-devel?hl=en.

Reply via email to