예제 #1
0
        /// <summary>
        /// Take an unmanaged pointer and convert it to filter source callback paramater
        /// </summary>
        /// <param name="ptr"></param>
        /// <returns></returns>
        internal static unsafe FilterSource FromNativePtr(git_filter_source *ptr)
        {
            FilePath   path = LaxFilePathMarshaler.FromNative(ptr->path) ?? FilePath.Empty;
            FilterMode gitFilterSourceMode = Proxy.git_filter_source_mode(ptr);

            return(new FilterSource(path, gitFilterSourceMode, ptr));
        }
예제 #2
0
 internal unsafe FilterSource(FilePath path, FilterMode mode, git_filter_source *source)
 {
     SourceMode = mode;
     ObjectId   = ObjectId.BuildFromPtr(&source->oid);
     Path       = path.Native;
     Root       = Proxy.git_repository_workdir(new IntPtr(source->repository)).Native;
 }