コード例 #1
0
 /** Copy attributes to another camera dependency.
  */
 public void CopyAttributesTo(CameraDependency cameraDependency)
 {
     if (cameraDependency == null)
     {
         throw new ArgumentNullException("cameraDependency cannot be null!");
     }
     CameraDependency_CopyAttributesTo(nativePtr, cameraDependency.NativePointer);
 }
コード例 #2
0
        internal static CameraDependency GetInstance(IntPtr ptr)
        {
            if (ptr == null || ptr == IntPtr.Zero)
            {
                return(null);
            }
            if (cameraDependencyInstances == null)
            {
                cameraDependencyInstances = new Dictionary <IntPtr, CameraDependency>();
            }

            CameraDependency newvalue;

            if (cameraDependencyInstances.TryGetValue(ptr, out newvalue))
            {
                return(newvalue);
            }
            newvalue = new CameraDependency(ptr);
            cameraDependencyInstances.Add(ptr, newvalue);
            return(newvalue);
        }