Fixing MarshalAs

Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/503bbde8
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/503bbde8
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/503bbde8

Branch: refs/heads/ignite-1694
Commit: 503bbde8736e83e2c5fbba97277dfc1d984b6087
Parents: 09e79b0
Author: Pavel Tupitsyn <ptupit...@gridgain.com>
Authored: Thu Nov 12 11:50:52 2015 +0300
Committer: Pavel Tupitsyn <ptupit...@gridgain.com>
Committed: Thu Nov 12 11:50:52 2015 +0300

----------------------------------------------------------------------
 .../Impl/Unmanaged/IgniteJniNativeMethods.cs    |   8 +
 modules/platforms/dotnet/Apache.Ignite.FxCop    | 543 ++++++++++++++++++-
 2 files changed, 549 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/503bbde8/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/IgniteJniNativeMethods.cs
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/IgniteJniNativeMethods.cs
 
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/IgniteJniNativeMethods.cs
index a63230b..9996d3e 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/IgniteJniNativeMethods.cs
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/IgniteJniNativeMethods.cs
@@ -39,6 +39,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = 
"IgniteIgnitionStop", SetLastError = true,
             CharSet = CharSet.Ansi, BestFitMapping = false, 
ThrowOnUnmappableChar = true)]
+        [return: MarshalAs(UnmanagedType.U1)]
         public static extern bool IgnitionStop(void* ctx, sbyte* gridName, 
bool cancel);
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = 
"IgniteIgnitionStopAll", SetLastError = true,
@@ -199,6 +200,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = 
"IgniteCacheTryEnterLock", SetLastError = true,
             CharSet = CharSet.Ansi, BestFitMapping = false, 
ThrowOnUnmappableChar = true)]
+        [return: MarshalAs(UnmanagedType.U1)]
         public static extern bool CacheTryEnterLock(void* ctx, void* obj, long 
id, long timeout);
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = 
"IgniteCacheCloseLock", SetLastError = true,
@@ -243,6 +245,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = 
"IgniteDataStreamerAllowOverwriteGet",
             SetLastError = true, CharSet = CharSet.Ansi, BestFitMapping = 
false, ThrowOnUnmappableChar = true)]
+        [return: MarshalAs(UnmanagedType.U1)]
         public static extern bool DataStreamerAllowOverwriteGet(void* ctx, 
void* obj);
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = 
"IgniteDataStreamerAllowOverwriteSet",
@@ -251,6 +254,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = 
"IgniteDataStreamerSkipStoreGet",
             SetLastError = true, CharSet = CharSet.Ansi, BestFitMapping = 
false, ThrowOnUnmappableChar = true)]
+        [return: MarshalAs(UnmanagedType.U1)]
         public static extern bool DataStreamerSkipStoreGet(void* ctx, void* 
obj);
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = 
"IgniteDataStreamerSkipStoreSet",
@@ -356,6 +360,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = 
"IgniteTransactionsSetRollbackOnly",
             SetLastError = true, CharSet = CharSet.Ansi, BestFitMapping = 
false, ThrowOnUnmappableChar = true)]
+        [return: MarshalAs(UnmanagedType.U1)]
         public static extern bool TxSetRollbackOnly(void* ctx, void* target, 
long id);
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = 
"IgniteTransactionsResetMetrics",
@@ -388,6 +393,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = 
"IgniteEventsStopLocalListen", SetLastError = true,
             CharSet = CharSet.Ansi, BestFitMapping = false, 
ThrowOnUnmappableChar = true)]
+        [return: MarshalAs(UnmanagedType.U1)]
         public static extern bool EventsStopLocalListen(void* ctx, void* obj, 
long hnd);
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = 
"IgniteEventsLocalListen", SetLastError = true,
@@ -396,6 +402,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = 
"IgniteEventsIsEnabled", SetLastError = true,
             CharSet = CharSet.Ansi, BestFitMapping = false, 
ThrowOnUnmappableChar = true)]
+        [return: MarshalAs(UnmanagedType.U1)]
         public static extern bool EventsIsEnabled(void* ctx, void* obj, int 
type);
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = 
"IgniteServicesWithAsync", SetLastError = true,
@@ -445,6 +452,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = 
"IgniteAtomicLongIsClosed", SetLastError = true,
             CharSet = CharSet.Ansi, BestFitMapping = false, 
ThrowOnUnmappableChar = true)]
+        [return: MarshalAs(UnmanagedType.U1)]
         public static extern bool AtomicLongIsClosed(void* ctx, void* target);
 
         [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = 
"IgniteAtomicLongClose", SetLastError = true,

http://git-wip-us.apache.org/repos/asf/ignite/blob/503bbde8/modules/platforms/dotnet/Apache.Ignite.FxCop
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.FxCop 
b/modules/platforms/dotnet/Apache.Ignite.FxCop
index 5c7f7f1..fddb1c8 100644
--- a/modules/platforms/dotnet/Apache.Ignite.FxCop
+++ b/modules/platforms/dotnet/Apache.Ignite.FxCop
@@ -107,11 +107,550 @@
    </RuleFile>
    <RuleFile Name="$(FxCopDir)\Rules\PerformanceRules.dll" Enabled="True" 
AllRulesEnabled="True" />
    <RuleFile Name="$(FxCopDir)\Rules\PortabilityRules.dll" Enabled="True" 
AllRulesEnabled="True" />
-   <RuleFile Name="$(FxCopDir)\Rules\SecurityRules.dll" Enabled="True" 
AllRulesEnabled="True" />
+   <RuleFile Name="$(FxCopDir)\Rules\SecurityRules.dll" Enabled="True" 
AllRulesEnabled="False">
+    <Rule Name="AptcaMethodsShouldOnlyCallAptcaMethods" Enabled="True" />
+    <Rule Name="AptcaTypesShouldOnlyExtendAptcaBaseTypes" Enabled="True" />
+    <Rule Name="ArrayFieldsShouldNotBeReadOnly" Enabled="True" />
+    <Rule Name="CallGCKeepAliveWhenUsingNativeResources" Enabled="True" />
+    <Rule Name="CatchNonClsCompliantExceptionsInGeneralHandlers" 
Enabled="True" />
+    <Rule Name="DoNotDeclareReadOnlyMutableReferenceTypes" Enabled="True" />
+    <Rule Name="DoNotIndirectlyExposeMethodsWithLinkDemands" Enabled="True" />
+    <Rule Name="MethodSecurityShouldBeASupersetOfType" Enabled="True" />
+    <Rule Name="OverrideLinkDemandsShouldBeIdenticalToBase" Enabled="True" />
+    <Rule Name="PointersShouldNotBeVisible" Enabled="True" />
+    <Rule Name="ReviewDeclarativeSecurityOnValueTypes" Enabled="True" />
+    <Rule Name="ReviewDenyAndPermitOnlyUsage" Enabled="True" />
+    <Rule Name="ReviewImperativeSecurity" Enabled="True" />
+    <Rule Name="ReviewVisibleEventHandlers" Enabled="True" />
+    <Rule Name="SealMethodsThatSatisfyPrivateInterfaces" Enabled="True" />
+    <Rule Name="SecureAsserts" Enabled="True" />
+    <Rule Name="SecuredTypesShouldNotExposeFields" Enabled="True" />
+    <Rule Name="SecureSerializationConstructors" Enabled="True" />
+    <Rule 
Name="SecurityTransparentAssembliesShouldNotContainSecurityCriticalCode" 
Enabled="True" />
+    <Rule Name="SecurityTransparentCodeShouldNotAssert" Enabled="True" />
+    <Rule 
Name="SecurityTransparentCodeShouldNotReferenceNonpublicSecurityCriticalCode" 
Enabled="True" />
+    <Rule Name="StaticConstructorsShouldBePrivate" Enabled="True" />
+    <Rule Name="TypeLinkDemandsRequireInheritanceDemands" Enabled="True" />
+    <Rule Name="WrapVulnerableFinallyClausesInOuterTry" Enabled="True" />
+   </RuleFile>
    <RuleFile Name="$(FxCopDir)\Rules\UsageRules.dll" Enabled="True" 
AllRulesEnabled="True" />
   </RuleFiles>
   <Groups />
   <Settings />
  </Rules>
- <FxCopReport Version="1.36" />
+ <FxCopReport Version="1.36">
+  <Targets>
+   <Target 
Name="$(ProjectDir)/Apache.Ignite.Core/bin/x64/Debug/Apache.Ignite.Core.dll">
+    <Modules>
+     <Module Name="apache.ignite.core.dll">
+      <Namespaces>
+       <Namespace Name="Apache.Ignite.Core.Binary">
+        <Types>
+         <Type Name="IBinaryReader">
+          <Members>
+           <Member Name="#GetRawReader()">
+            <Messages>
+             <Message TypeName="UsePropertiesWhereAppropriate" 
Category="Microsoft.Design" CheckId="CA1024" Created="2015-11-11 15:43:38Z">
+              <Issue Certainty="50">
+               <Item>'IBinaryReader.GetRawReader()'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+          </Members>
+         </Type>
+         <Type Name="IBinaryWriter">
+          <Members>
+           <Member Name="#GetRawWriter()">
+            <Messages>
+             <Message TypeName="UsePropertiesWhereAppropriate" 
Category="Microsoft.Design" CheckId="CA1024" Created="2015-11-11 15:43:38Z">
+              <Issue Certainty="50">
+               <Item>'IBinaryWriter.GetRawWriter()'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+          </Members>
+         </Type>
+         <Type Name="IIgniteBinary">
+          <Members>
+           <Member Name="#GetBinaryTypes()">
+            <Messages>
+             <Message TypeName="UsePropertiesWhereAppropriate" 
Category="Microsoft.Design" CheckId="CA1024" Created="2015-11-11 15:43:38Z">
+              <Issue Certainty="50">
+               <Item>'IIgniteBinary.GetBinaryTypes()'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+          </Members>
+         </Type>
+        </Types>
+       </Namespace>
+       <Namespace Name="Apache.Ignite.Core.Cache">
+        <Types>
+         <Type Name="ICache`2">
+          <Members>
+           <Member 
Name="#TryLocalPeek(!0,!1&amp;,Apache.Ignite.Core.Cache.CachePeekMode[])">
+            <Messages>
+             <Message Id="1#" TypeName="AvoidOutParameters" 
Category="Microsoft.Design" CheckId="CA1021" Created="2015-11-11 15:43:38Z">
+              <Issue>
+               <Item>'value'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+          </Members>
+         </Type>
+        </Types>
+       </Namespace>
+       <Namespace Name="Apache.Ignite.Core.Compute">
+        <Types>
+         <Type Name="ComputeJobAdapter`1">
+          <Members>
+           <Member Name="#GetArgument`1(System.Int32)">
+            <Messages>
+             <Message TypeName="DoNotRaiseReservedExceptionTypes" 
Category="Microsoft.Usage" CheckId="CA2201" Created="2015-11-11 15:43:38Z">
+              <Issue Name="Reserved">
+               
<Item>'ComputeJobAdapter&lt;T&gt;.GetArgument&lt;TArg&gt;(int)'</Item>
+               <Item>'IndexOutOfRangeException'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+          </Members>
+         </Type>
+        </Types>
+       </Namespace>
+       <Namespace Name="Apache.Ignite.Core.Events">
+        <Types>
+         <Type Name="IEvents">
+          <Members>
+           <Member Name="#GetEnabledEvents()">
+            <Messages>
+             <Message TypeName="UsePropertiesWhereAppropriate" 
Category="Microsoft.Design" CheckId="CA1024" Created="2015-11-11 15:43:38Z">
+              <Issue Certainty="50">
+               <Item>'IEvents.GetEnabledEvents()'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+          </Members>
+         </Type>
+        </Types>
+       </Namespace>
+       <Namespace Name="Apache.Ignite.Core.Impl">
+        <Types>
+         <Type Name="IgniteUtils">
+          <Members>
+           <Member Name="#.cctor()">
+            <Messages>
+             <Message TypeName="InitializeReferenceTypeStaticFieldsInline" 
Category="Microsoft.Performance" CheckId="CA1810" Created="2015-11-11 
15:43:38Z">
+              <Issue>
+               <Item>'IgniteUtils'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+          </Members>
+         </Type>
+        </Types>
+       </Namespace>
+       <Namespace Name="Apache.Ignite.Core.Impl.Binary">
+        <Types>
+         <Type Name="BinaryReader">
+          <Members>
+           <Member Name="#Deserialize`1()">
+            <Messages>
+             <Message Id="System.String.Format(System.String,System.Object)" 
TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" 
CheckId="CA1305" Created="2015-11-11 15:43:38Z">
+              <Issue>
+               <Item>'string.Format(string, object)'</Item>
+               <Item>'BinaryReader.Deserialize&lt;T&gt;()'</Item>
+               <Item>'string.Format(IFormatProvider, string, params 
object[])'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member Name="#IsNotNullHeader(System.Byte)">
+            <Messages>
+             <Message 
Id="System.String.Format(System.String,System.Object,System.Object)" 
TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" 
CheckId="CA1305" Created="2015-11-11 15:43:38Z">
+              <Issue>
+               <Item>'string.Format(string, object, object)'</Item>
+               <Item>'BinaryReader.IsNotNullHeader(byte)'</Item>
+               <Item>'string.Format(IFormatProvider, string, params 
object[])'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+          </Members>
+         </Type>
+         <Type Name="Marshaller">
+          <Members>
+           <Member 
Name="#AddType(System.Type,System.Int32,System.String,System.Boolean,System.Boolean,Apache.Ignite.Core.Binary.IBinaryNameMapper,Apache.Ignite.Core.Binary.IBinaryIdMapper,Apache.Ignite.Core.Binary.IBinarySerializer,System.String)">
+            <Messages>
+             <Message 
Id="System.String.Format(System.String,System.Object,System.Object,System.Object)"
 TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" 
CheckId="CA1305" Created="2015-11-11 15:43:38Z">
+              <Issue>
+               <Item>'string.Format(string, object, object, object)'</Item>
+               <Item>'Marshaller.AddType(Type, int, string, bool, bool, 
IBinaryNameMapper, IBinaryIdMapper, IBinarySerializer, string)'</Item>
+               <Item>'string.Format(IFormatProvider, string, params 
object[])'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+          </Members>
+         </Type>
+        </Types>
+       </Namespace>
+       <Namespace Name="Apache.Ignite.Core.Impl.Common">
+        <Types>
+         <Type Name="Classpath">
+          <Members>
+           <Member 
Name="#AppendHomeClasspath(System.String,System.Boolean,System.Text.StringBuilder)">
+            <Messages>
+             <Message Id="System.String.EndsWith(System.String)" 
TypeName="SpecifyStringComparison" Category="Microsoft.Globalization" 
CheckId="CA1307" Created="2015-11-11 15:43:38Z">
+              <Issue>
+               <Item>'Classpath.AppendHomeClasspath(string, bool, 
StringBuilder)'</Item>
+               <Item>'string.EndsWith(string)'</Item>
+               <Item>'string.EndsWith(string, StringComparison)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member 
Name="#CreateClasspath(System.String,Apache.Ignite.Core.IgniteConfiguration,System.Boolean)">
+            <Messages>
+             <Message Id="System.String.EndsWith(System.String)" 
TypeName="SpecifyStringComparison" Category="Microsoft.Globalization" 
CheckId="CA1307" Created="2015-11-11 15:43:38Z">
+              <Issue>
+               <Item>'Classpath.CreateClasspath(string, IgniteConfiguration, 
bool)'</Item>
+               <Item>'string.EndsWith(string)'</Item>
+               <Item>'string.EndsWith(string, StringComparison)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+          </Members>
+         </Type>
+         <Type Name="Future`1">
+          <Members>
+           <Member Name="#OnNullResult()">
+            <Messages>
+             <Message TypeName="DoNotCatchGeneralExceptionTypes" 
Category="Microsoft.Design" CheckId="CA1031" Created="2015-11-11 15:43:38Z">
+              <Issue>
+               <Item>'Future&lt;T&gt;.OnNullResult()'</Item>
+               <Item>'Exception'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+          </Members>
+         </Type>
+         <Type Name="IgniteHome">
+          <Members>
+           <Member Name="#Resolve(Apache.Ignite.Core.IgniteConfiguration)">
+            <Messages>
+             <Message Id="System.String.Format(System.String,System.Object)" 
TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" 
CheckId="CA1305" Created="2015-11-11 15:43:38Z">
+              <Issue>
+               <Item>'string.Format(string, object)'</Item>
+               <Item>'IgniteHome.Resolve(IgniteConfiguration)'</Item>
+               <Item>'string.Format(IFormatProvider, string, params 
object[])'</Item>
+              </Issue>
+             </Message>
+             <Message 
Id="System.String.Format(System.String,System.Object,System.Object)" 
TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" 
CheckId="CA1305" Created="2015-11-11 15:43:38Z">
+              <Issue>
+               <Item>'string.Format(string, object, object)'</Item>
+               <Item>'IgniteHome.Resolve(IgniteConfiguration)'</Item>
+               <Item>'string.Format(IFormatProvider, string, params 
object[])'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+          </Members>
+         </Type>
+        </Types>
+       </Namespace>
+       <Namespace Name="Apache.Ignite.Core.Impl.Memory">
+        <Types>
+         <Type Name="IPlatformMemory">
+          <Members>
+           <Member Name="#GetStream()">
+            <Messages>
+             <Message TypeName="UsePropertiesWhereAppropriate" 
Category="Microsoft.Design" CheckId="CA1024" Created="2015-11-11 15:43:38Z">
+              <Issue Certainty="50">
+               <Item>'IPlatformMemory.GetStream()'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+          </Members>
+         </Type>
+        </Types>
+       </Namespace>
+       <Namespace Name="Apache.Ignite.Core.Impl.Unmanaged">
+        <Types>
+         <Type Name="IgniteJniNativeMethods">
+          <Members>
+           <Member Name="#AtomicLongIsClosed(System.Void*,System.Void*)">
+            <Messages>
+             <Message TypeName="MarkBooleanPInvokeArgumentsWithMarshalAs" 
Category="Microsoft.Interoperability" CheckId="CA1414" Created="2015-11-11 
15:48:32Z">
+              <Issue Name="Return">
+               <Item>'IgniteJniNativeMethods.AtomicLongIsClosed(void*, 
void*)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member 
Name="#CacheSize(System.Void*,System.Void*,System.Int32,System.Boolean)">
+            <Messages>
+             <Message TypeName="MarkBooleanPInvokeArgumentsWithMarshalAs" 
Category="Microsoft.Interoperability" CheckId="CA1414" Created="2015-11-11 
15:48:32Z">
+              <Issue>
+               <Item>'loc'</Item>
+               <Item>'IgniteJniNativeMethods.CacheSize(void*, void*, int, 
bool)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member 
Name="#CacheTryEnterLock(System.Void*,System.Void*,System.Int64,System.Int64)">
+            <Messages>
+             <Message TypeName="MarkBooleanPInvokeArgumentsWithMarshalAs" 
Category="Microsoft.Interoperability" CheckId="CA1414" Created="2015-11-11 
15:48:32Z">
+              <Issue Name="Return">
+               <Item>'IgniteJniNativeMethods.CacheTryEnterLock(void*, void*, 
long, long)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member 
Name="#CreateContext(System.Void*,System.Int32,System.Void*)">
+            <Messages>
+             <Message TypeName="ReviewSuppressUnmanagedCodeSecurityUsage" 
Category="Microsoft.Security" CheckId="CA2118" Created="2015-11-11 15:48:32Z">
+              <Issue Name="PlatformInvokeStack">
+               <Item>'IgniteJniNativeMethods.CreateContext(void*, int, 
void*)'</Item>
+               <Item>&#xD;&#xA;   
-&gt;'IgniteJniNativeMethods.CreateContext(void*, int, void*)'&#xD;&#xA;   
-&gt;'UnmanagedUtils.CreateContext(void*, int, void*)'&#xD;&#xA;   
-&gt;'IgniteManager.CreateJvm(IgniteConfiguration, 
UnmanagedCallbacks)'&#xD;&#xA;   
-&gt;'IgniteManager.CreateJvmContext(IgniteConfiguration, 
UnmanagedCallbacks)'&#xD;&#xA;   
-&gt;'Ignition.Start(IgniteConfiguration)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member 
Name="#DataStreamerAllowOverwriteGet(System.Void*,System.Void*)">
+            <Messages>
+             <Message TypeName="MarkBooleanPInvokeArgumentsWithMarshalAs" 
Category="Microsoft.Interoperability" CheckId="CA1414" Created="2015-11-11 
15:48:32Z">
+              <Issue Name="Return">
+               
<Item>'IgniteJniNativeMethods.DataStreamerAllowOverwriteGet(void*, 
void*)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member 
Name="#DataStreamerAllowOverwriteSet(System.Void*,System.Void*,System.Boolean)">
+            <Messages>
+             <Message TypeName="MarkBooleanPInvokeArgumentsWithMarshalAs" 
Category="Microsoft.Interoperability" CheckId="CA1414" Created="2015-11-11 
15:48:32Z">
+              <Issue>
+               <Item>'val'</Item>
+               
<Item>'IgniteJniNativeMethods.DataStreamerAllowOverwriteSet(void*, void*, 
bool)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member Name="#DataStreamerSkipStoreGet(System.Void*,System.Void*)">
+            <Messages>
+             <Message TypeName="MarkBooleanPInvokeArgumentsWithMarshalAs" 
Category="Microsoft.Interoperability" CheckId="CA1414" Created="2015-11-11 
15:48:32Z">
+              <Issue Name="Return">
+               <Item>'IgniteJniNativeMethods.DataStreamerSkipStoreGet(void*, 
void*)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member 
Name="#DataStreamerSkipStoreSet(System.Void*,System.Void*,System.Boolean)">
+            <Messages>
+             <Message TypeName="MarkBooleanPInvokeArgumentsWithMarshalAs" 
Category="Microsoft.Interoperability" CheckId="CA1414" Created="2015-11-11 
15:48:32Z">
+              <Issue>
+               <Item>'val'</Item>
+               <Item>'IgniteJniNativeMethods.DataStreamerSkipStoreSet(void*, 
void*, bool)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member Name="#DestroyJvm(System.Void*)">
+            <Messages>
+             <Message TypeName="ReviewSuppressUnmanagedCodeSecurityUsage" 
Category="Microsoft.Security" CheckId="CA2118" Created="2015-11-11 15:48:32Z">
+              <Issue Name="PlatformInvokeStack">
+               <Item>'IgniteJniNativeMethods.DestroyJvm(void*)'</Item>
+               <Item>&#xD;&#xA;   
-&gt;'IgniteJniNativeMethods.DestroyJvm(void*)'&#xD;&#xA;   
-&gt;'UnmanagedUtils.DestroyJvm(void*)'&#xD;&#xA;   
-&gt;'IgniteManager.DestroyJvm()'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member 
Name="#EventsIsEnabled(System.Void*,System.Void*,System.Int32)">
+            <Messages>
+             <Message TypeName="MarkBooleanPInvokeArgumentsWithMarshalAs" 
Category="Microsoft.Interoperability" CheckId="CA1414" Created="2015-11-11 
15:48:32Z">
+              <Issue Name="Return">
+               <Item>'IgniteJniNativeMethods.EventsIsEnabled(void*, void*, 
int)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member 
Name="#EventsStopLocalListen(System.Void*,System.Void*,System.Int64)">
+            <Messages>
+             <Message TypeName="MarkBooleanPInvokeArgumentsWithMarshalAs" 
Category="Microsoft.Interoperability" CheckId="CA1414" Created="2015-11-11 
15:48:32Z">
+              <Issue Name="Return">
+               <Item>'IgniteJniNativeMethods.EventsStopLocalListen(void*, 
void*, long)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member Name="#HandlersSize()">
+            <Messages>
+             <Message TypeName="ReviewSuppressUnmanagedCodeSecurityUsage" 
Category="Microsoft.Security" CheckId="CA2118" Created="2015-11-11 15:48:32Z">
+              <Issue Name="PlatformInvokeStack">
+               <Item>'IgniteJniNativeMethods.HandlersSize()'</Item>
+               <Item>&#xD;&#xA;   
-&gt;'IgniteJniNativeMethods.HandlersSize()'&#xD;&#xA;   
-&gt;'UnmanagedUtils.HandlersSize()'&#xD;&#xA;   
-&gt;'UnmanagedCallbacks.UnmanagedCallbacks()'&#xD;&#xA;   
-&gt;'Ignition.Start(IgniteConfiguration)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member 
Name="#IgnitionStart(System.Void*,System.SByte*,System.SByte*,System.Int32,System.Int64)">
+            <Messages>
+             <Message TypeName="ReviewSuppressUnmanagedCodeSecurityUsage" 
Category="Microsoft.Security" CheckId="CA2118" Created="2015-11-11 15:48:32Z">
+              <Issue Name="PlatformInvokeStack">
+               <Item>'IgniteJniNativeMethods.IgnitionStart(void*, sbyte*, 
sbyte*, int, long)'</Item>
+               <Item>&#xD;&#xA;   
-&gt;'IgniteJniNativeMethods.IgnitionStart(void*, sbyte*, sbyte*, int, 
long)'&#xD;&#xA;   -&gt;'UnmanagedUtils.IgnitionStart(UnmanagedContext, string, 
string, bool)'&#xD;&#xA;   -&gt;'Ignition.Start(IgniteConfiguration)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member 
Name="#IgnitionStop(System.Void*,System.SByte*,System.Boolean)">
+            <Messages>
+             <Message TypeName="MarkBooleanPInvokeArgumentsWithMarshalAs" 
Category="Microsoft.Interoperability" CheckId="CA1414" Created="2015-11-11 
15:48:32Z">
+              <Issue>
+               <Item>'cancel'</Item>
+               <Item>'IgniteJniNativeMethods.IgnitionStop(void*, sbyte*, 
bool)'</Item>
+              </Issue>
+              <Issue Name="Return">
+               <Item>'IgniteJniNativeMethods.IgnitionStop(void*, sbyte*, 
bool)'</Item>
+              </Issue>
+             </Message>
+             <Message TypeName="ReviewSuppressUnmanagedCodeSecurityUsage" 
Category="Microsoft.Security" CheckId="CA2118" Created="2015-11-11 15:48:32Z">
+              <Issue Name="PlatformInvokeStack">
+               <Item>'IgniteJniNativeMethods.IgnitionStop(void*, sbyte*, 
bool)'</Item>
+               <Item>&#xD;&#xA;   
-&gt;'IgniteJniNativeMethods.IgnitionStop(void*, sbyte*, bool)'&#xD;&#xA;   
-&gt;'UnmanagedUtils.IgnitionStop(void*, string, bool)'&#xD;&#xA;   
-&gt;'Ignite.Stop(bool)'&#xD;&#xA;   -&gt;'Ignition.Stop(string, bool)'</Item>
+              </Issue>
+              <Issue Name="PlatformInvokeStack">
+               <Item>'IgniteJniNativeMethods.IgnitionStop(void*, sbyte*, 
bool)'</Item>
+               <Item>&#xD;&#xA;   
-&gt;'IgniteJniNativeMethods.IgnitionStop(void*, sbyte*, bool)'&#xD;&#xA;   
-&gt;'UnmanagedUtils.IgnitionStop(void*, string, bool)'&#xD;&#xA;   
-&gt;'Ignite.Stop(bool)'&#xD;&#xA;   -&gt;'Ignition.StopAll(bool)'</Item>
+              </Issue>
+              <Issue Name="PlatformInvokeStack">
+               <Item>'IgniteJniNativeMethods.IgnitionStop(void*, sbyte*, 
bool)'</Item>
+               <Item>&#xD;&#xA;   
-&gt;'IgniteJniNativeMethods.IgnitionStop(void*, sbyte*, bool)'&#xD;&#xA;   
-&gt;'UnmanagedUtils.IgnitionStop(void*, string, bool)'&#xD;&#xA;   
-&gt;'Ignition.Start(IgniteConfiguration)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member Name="#IgnitionStopAll(System.Void*,System.Boolean)">
+            <Messages>
+             <Message TypeName="MarkBooleanPInvokeArgumentsWithMarshalAs" 
Category="Microsoft.Interoperability" CheckId="CA1414" Created="2015-11-11 
15:48:32Z">
+              <Issue>
+               <Item>'cancel'</Item>
+               <Item>'IgniteJniNativeMethods.IgnitionStopAll(void*, 
bool)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member 
Name="#ProcessorAtomicLong(System.Void*,System.Void*,System.SByte*,System.Int64,System.Boolean)">
+            <Messages>
+             <Message TypeName="MarkBooleanPInvokeArgumentsWithMarshalAs" 
Category="Microsoft.Interoperability" CheckId="CA1414" Created="2015-11-11 
15:48:32Z">
+              <Issue>
+               <Item>'create'</Item>
+               <Item>'IgniteJniNativeMethods.ProcessorAtomicLong(void*, void*, 
sbyte*, long, bool)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member 
Name="#ProcessorDataStreamer(System.Void*,System.Void*,System.SByte*,System.Boolean)">
+            <Messages>
+             <Message TypeName="MarkBooleanPInvokeArgumentsWithMarshalAs" 
Category="Microsoft.Interoperability" CheckId="CA1414" Created="2015-11-11 
15:48:32Z">
+              <Issue>
+               <Item>'keepBinary'</Item>
+               <Item>'IgniteJniNativeMethods.ProcessorDataStreamer(void*, 
void*, sbyte*, bool)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member Name="#ProcessorReleaseStart(System.Void*,System.Void*)">
+            <Messages>
+             <Message TypeName="ReviewSuppressUnmanagedCodeSecurityUsage" 
Category="Microsoft.Security" CheckId="CA2118" Created="2015-11-11 15:48:32Z">
+              <Issue Name="PlatformInvokeStack">
+               <Item>'IgniteJniNativeMethods.ProcessorReleaseStart(void*, 
void*)'</Item>
+               <Item>&#xD;&#xA;   
-&gt;'IgniteJniNativeMethods.ProcessorReleaseStart(void*, void*)'&#xD;&#xA;   
-&gt;'UnmanagedUtils.ProcessorReleaseStart(IUnmanagedTarget)'&#xD;&#xA;   
-&gt;'Ignition.Start(IgniteConfiguration)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member 
Name="#ServicesGetServiceProxy(System.Void*,System.Void*,System.Char*,System.Boolean)">
+            <Messages>
+             <Message TypeName="MarkBooleanPInvokeArgumentsWithMarshalAs" 
Category="Microsoft.Interoperability" CheckId="CA1414" Created="2015-11-11 
15:48:32Z">
+              <Issue>
+               <Item>'sticky'</Item>
+               <Item>'IgniteJniNativeMethods.ServicesGetServiceProxy(void*, 
void*, char*, bool)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+           <Member 
Name="#TxSetRollbackOnly(System.Void*,System.Void*,System.Int64)">
+            <Messages>
+             <Message TypeName="MarkBooleanPInvokeArgumentsWithMarshalAs" 
Category="Microsoft.Interoperability" CheckId="CA1414" Created="2015-11-11 
15:48:32Z">
+              <Issue Name="Return">
+               <Item>'IgniteJniNativeMethods.TxSetRollbackOnly(void*, void*, 
long)'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+          </Members>
+         </Type>
+         <Type Name="UnmanagedUtils">
+          <Members>
+           <Member Name="#.cctor()">
+            <Messages>
+             <Message 
Id="System.String.Format(System.String,System.Object,System.Object)" 
TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" 
CheckId="CA1305" Created="2015-11-11 15:43:38Z">
+              <Issue>
+               <Item>'string.Format(string, object, object)'</Item>
+               <Item>'UnmanagedUtils.UnmanagedUtils()'</Item>
+               <Item>'string.Format(IFormatProvider, string, params 
object[])'</Item>
+              </Issue>
+             </Message>
+            </Messages>
+           </Member>
+          </Members>
+         </Type>
+        </Types>
+       </Namespace>
+      </Namespaces>
+     </Module>
+    </Modules>
+   </Target>
+  </Targets>
+  <Rules>
+   <Rule TypeName="AvoidOutParameters" Category="Microsoft.Design" 
CheckId="CA1021">
+    <Resolution Name="Default">Consider a design that does not require that 
{0} be an out parameter.</Resolution>
+   </Rule>
+   <Rule TypeName="DoNotCatchGeneralExceptionTypes" 
Category="Microsoft.Design" CheckId="CA1031">
+    <Resolution Name="Default">Modify {0} to catch a more specific exception 
than {1} or rethrow the exception.</Resolution>
+   </Rule>
+   <Rule TypeName="DoNotRaiseReservedExceptionTypes" 
Category="Microsoft.Usage" CheckId="CA2201">
+    <Resolution Name="Reserved">{0} creates an exception of type {1}, an 
exception type that is reserved by the runtime and should never be raised by 
managed code. If this exception instance might be thrown, use a different 
exception type.</Resolution>
+   </Rule>
+   <Rule TypeName="InitializeReferenceTypeStaticFieldsInline" 
Category="Microsoft.Performance" CheckId="CA1810">
+    <Resolution Name="Default">Initialize all static fields in {0} when those 
fields are declared and remove the explicit static constructor.</Resolution>
+   </Rule>
+   <Rule TypeName="MarkBooleanPInvokeArgumentsWithMarshalAs" 
Category="Microsoft.Interoperability" CheckId="CA1414">
+    <Resolution Name="Default">Add the MarshalAsAttribute to parameter {0} of 
P/Invoke {1}. If the corresponding unmanaged parameter is a 4-byte Win32 
'BOOL', use [MarshalAs(UnmanagedType.Bool)]. For a 1-byte C++ 'bool', use 
MarshalAs(UnmanagedType.U1).</Resolution>
+    <Resolution Name="Return">Add the MarshalAsAttribute to the return type of 
P/Invoke {0}. If the corresponding unmanaged return type is a 4-byte Win32 
'BOOL', use MarshalAs(UnmanagedType.Bool). For a 1-byte C++ 'bool', use 
MarshalAs(UnmanagedType.U1).</Resolution>
+   </Rule>
+   <Rule TypeName="ReviewSuppressUnmanagedCodeSecurityUsage" 
Category="Microsoft.Security" CheckId="CA2118">
+    <Resolution Name="PlatformInvokeStack">Review declarative security for {0} 
and its callers for potential vulnerabilities. The following call stack might 
expose a way to circumvent security protection: {1}</Resolution>
+   </Rule>
+   <Rule TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" 
CheckId="CA1305">
+    <Resolution Name="Default">Because the behavior of {0} could vary based on 
the current user's locale settings, replace this call in {1} with a call to 
{2}. If the result of {2} will be displayed to the user, specify 
'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if 
the result will be stored and accessed by software, such as when it is 
persisted to disk or to a database, specify 
'CultureInfo.InvariantCulture'.</Resolution>
+   </Rule>
+   <Rule TypeName="SpecifyStringComparison" Category="Microsoft.Globalization" 
CheckId="CA1307">
+    <Resolution Name="Default">{0} makes a call to {1} that does not 
explicitly provide a StringComparison. This should be replaced with a call to 
{2}.</Resolution>
+   </Rule>
+   <Rule TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" 
CheckId="CA1024">
+    <Resolution Name="Default">Change {0} to a property if 
appropriate.</Resolution>
+   </Rule>
+  </Rules>
+ </FxCopReport>
 </FxCopProject>

Reply via email to