public static IntPtr GetRawPointer(ISassType returnedValue, InternalPtrValidityEventHandler onValidityEvent) { if (returnedValue == null) { returnedValue = SassNull.Instance; } var sassExportableType = returnedValue as ISassExportableType; if (sassExportableType != null) { return(sassExportableType.GetInternalTypePtr(onValidityEvent, true)); } // This should never happen. I could not find anyway to keep both // OOP and Resharper satisfied with the current design of ISassType // with public accessor and ISassExportableType with internal accessor // and all Sass types implementing both interfaces. return(IntPtr.Zero); }