Forum C# WhiteList Request

WhiteList Request

Postby Vania » April 19th, 2010, 6:48 pm

Hi, I just wanted to know if it's possible to whitelist these classes:

System.Comparison
System.Collections.Generic.IEnumerator
System.Collections.ObjectModel.ReadOnlyCollection


Some other classes that are used frequently in third party libraries:
System.Point, System.Rect, System.Size, but these are easy to replace with your own.

They're needed in a really nice QuadTree implementation I want to use. I've been trying to modify the quadtree code to get rid of forbidden classes, but I keep breaking it... :(

Let me know if some classes can be whitelisted, thanks.


Here's the error log:

CSharpQuadTree.QuadTree`1.Query(...) has varible of the non-allowed type: System.Comparison`1<T>
CSharpQuadTree.QuadTree`1.Query(...) uses the non-allowed method: System.Void System.Comparison`1<T>::.ctor(System.Object,System.IntPtr)
CSharpQuadTree.QuadTree`1.Query(...) uses the non-allowed method: System.Collections.Generic.IEnumerator`1<!0> System.Collections.ObjectModel.ReadOnlyCollection`1<T>::GetEnumerator()
CSharpQuadTree.QuadTree`1.Query(...) uses the non-allowed method: System.Collections.Generic.IEnumerator`1<!0> System.Collections.ObjectModel.ReadOnlyCollection`1<CSharpQuadTree.QuadTree`1/QuadNode<T>>::GetEnumerator()
CSharpQuadTree.QuadTree`1.InsertNodeObject(...) uses the non-allowed method: System.Int32 System.Collections.ObjectModel.ReadOnlyCollection`1<T>::get_Count()
CSharpQuadTree.QuadTree`1.InsertNodeObject(...) uses the non-allowed method: System.Collections.Generic.IEnumerator`1<!0> System.Collections.ObjectModel.ReadOnlyCollection`1<CSharpQuadTree.QuadTree`1/QuadNode<T>>::GetEnumerator()
CSharpQuadTree.QuadTree`1.InsertNodeObject(...) uses the non-allowed method: System.Collections.Generic.IEnumerator`1<!0> System.Collections.ObjectModel.ReadOnlyCollection`1<CSharpQuadTree.QuadTree`1/QuadNode<T>>::GetEnumerator()
CSharpQuadTree.QuadTree`1.CheckChildNodes(...) uses the non-allowed method: System.Boolean System.Collections.ObjectModel.ReadOnlyCollection`1<T>::Contains(!0)
CSharpQuadTree.QuadTree`1.CheckChildNodes(...) uses the non-allowed method: System.Collections.Generic.IEnumerator`1<!0> System.Collections.ObjectModel.ReadOnlyCollection`1<CSharpQuadTree.QuadTree`1/QuadNode<T>>::GetEnumerator()
CSharpQuadTree.QuadTree`1.CheckChildNodes(...) uses the non-allowed method: System.Collections.Generic.IEnumerator`1<!0> System.Collections.ObjectModel.ReadOnlyCollection`1<CSharpQuadTree.QuadTree`1/QuadNode<T>>::GetEnumerator()
CSharpQuadTree.QuadTree`1.GetChildObjects(...) uses the non-allowed method: System.Collections.Generic.IEnumerator`1<!0> System.Collections.ObjectModel.ReadOnlyCollection`1<CSharpQuadTree.QuadTree`1/QuadNode<T>>::GetEnumerator()
CSharpQuadTree.QuadTree`1.GetQuadObjectCount(...) uses the non-allowed method: System.Int32 System.Collections.ObjectModel.ReadOnlyCollection`1<T>::get_Count()
CSharpQuadTree.QuadTree`1.GetQuadObjectCount(...) uses the non-allowed method: System.Collections.Generic.IEnumerator`1<!0> System.Collections.ObjectModel.ReadOnlyCollection`1<CSharpQuadTree.QuadTree`1/QuadNode<T>>::GetEnumerator()
CSharpQuadTree.QuadTree`1.GetQuadNodeCount(...) uses the non-allowed method: System.Collections.Generic.IEnumerator`1<!0> System.Collections.ObjectModel.ReadOnlyCollection`1<CSharpQuadTree.QuadTree`1/QuadNode<T>>::GetEnumerator()
CSharpQuadTree.QuadTree`1.GetChildNodes(...) uses the non-allowed method: System.Collections.Generic.IEnumerator`1<!0> System.Collections.ObjectModel.ReadOnlyCollection`1<CSharpQuadTree.QuadTree`1/QuadNode<T>>::GetEnumerator()
CSharpQuadTree.QuadTree`1/QuadNode._id is static -- Static fields are disallowed
CSharpQuadTree.QuadTree`1/QuadNode..cctor() is static -- Static constructors are disallowed.
CSharpQuadTree.QuadTree`1/QuadNode.Nodes is of the non-allowed type: System.Collections.ObjectModel.ReadOnlyCollection`1<CSharpQuadTree.QuadTree`1/QuadNode<T>>
CSharpQuadTree.QuadTree`1/QuadNode.Objects is of the non-allowed type: System.Collections.ObjectModel.ReadOnlyCollection`1<T>
CSharpQuadTree.QuadTree`1/QuadNode..ctor(...) uses the non-allowed method: System.Void System.Collections.ObjectModel.ReadOnlyCollection`1<CSharpQuadTree.QuadTree`1/QuadNode<T>>::.ctor(System.Collections.Generic.IList`1<!0>)
CSharpQuadTree.QuadTree`1/QuadNode..ctor(...) uses the non-allowed method: System.Void System.Collections.ObjectModel.ReadOnlyCollection`1<T>::.ctor(System.Collections.Generic.IList`1<!0>)
Vania
 
Posts: 198
Joined: March 24th, 2010, 9:01 pm

Re: WhiteList Request

Postby Vania » April 19th, 2010, 7:03 pm

I've got the QuadTree working now, but it wouldnt be a bad idea to whitelist some of those classes.
Ive seen them in a bunch of libraries.
Vania
 
Posts: 198
Joined: March 24th, 2010, 9:01 pm

Re: WhiteList Request

Postby Oliver » April 20th, 2010, 1:00 pm

Hey Vanina,

We'll take a look at it... Can you send me the original source of the QuadTree?

-Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to C#